diff --git a/src/components/Map/Drawer/SearchDrawerContent/Results/PinsList/PinsListItem/PinsListItem.component.tsx b/src/components/Map/Drawer/SearchDrawerContent/Results/PinsList/PinsListItem/PinsListItem.component.tsx index 754795e9bc3d7e1d9b8d868e32ed2d3696165dd6..c6eba919fdc7c3dc7375bc62874cea9da02d8668 100644 --- a/src/components/Map/Drawer/SearchDrawerContent/Results/PinsList/PinsListItem/PinsListItem.component.tsx +++ b/src/components/Map/Drawer/SearchDrawerContent/Results/PinsList/PinsListItem/PinsListItem.component.tsx @@ -6,7 +6,7 @@ interface PinsListItemProps { export const PinsListItem = ({ name }: PinsListItemProps): JSX.Element => ( <div className="flex flex-row justify-between pt-4"> - <Icon name="pin-orange" className="mr-2 shrink-0" /> + <Icon name="pin" className="mr-2 shrink-0" /> <p className="w-full text-left">{name}</p> <Icon name="chevron-right" className="h-6 w-6 shrink-0" /> </div> diff --git a/src/components/Map/Drawer/SearchDrawerContent/Results/Results.component.tsx b/src/components/Map/Drawer/SearchDrawerContent/Results/Results.component.tsx index c6f7edadf1bd2ecf0ac393bb4b5020148e329659..89b9cd601d70e334669de335f5abb0acf793976a 100644 --- a/src/components/Map/Drawer/SearchDrawerContent/Results/Results.component.tsx +++ b/src/components/Map/Drawer/SearchDrawerContent/Results/Results.component.tsx @@ -1,7 +1,8 @@ import { DrawerHeadingBackwardButton } from '@/shared/DrawerHeadingBackwardButton'; import { PinsList } from './PinsList'; +import { PinItem } from './PinsList/PinsList.types'; -const PINS_LIST = [ +const PINS_LIST: PinItem[] = [ { name: 'Glyceraldehyde-3-phosphate dehydrogenase' }, { name: 'D-3-phosphoglycerate dehydrogenase' }, { name: 'Glutathione reductase, mitochondrial' }, diff --git a/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.component.tsx b/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.component.tsx index d5b6394adaea87a08ce906e1e222313084cc950c..4e39e76ac513958f91f90b29693bc88eb1f50d9e 100644 --- a/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.component.tsx +++ b/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.component.tsx @@ -1,9 +1,7 @@ import { useAppDispatch } from '@/redux/hooks/useAppDispatch'; import { closeDrawer } from '@/redux/drawer/drawer.slice'; import { IconButton } from '@/shared/IconButton'; - -export const CLOSE_BUTTON_ROLE = 'close-drawer-button'; -export const BACK_BUTTON_ROLE = 'back-button'; +import { BACK_BUTTON_ROLE, CLOSE_BUTTON_ROLE } from './DrawerHeadingBackwardButton.constants'; export interface DrawerHeadingBackwardButtonProps { title: string; diff --git a/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.constants.tsx b/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.constants.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8422870530be28c4877b289d32e73754160af761 --- /dev/null +++ b/src/shared/DrawerHeadingBackwardButton/DrawerHeadingBackwardButton.constants.tsx @@ -0,0 +1,2 @@ +export const CLOSE_BUTTON_ROLE = 'close-drawer-button'; +export const BACK_BUTTON_ROLE = 'back-button'; diff --git a/src/shared/Icon/Icon.component.tsx b/src/shared/Icon/Icon.component.tsx index 89943caeedbce5a0fbff814d04cd797a866f496f..b683ed15a8d2d574411618f5f9b8486c41b8319f 100644 --- a/src/shared/Icon/Icon.component.tsx +++ b/src/shared/Icon/Icon.component.tsx @@ -12,7 +12,7 @@ import { PageIcon } from '@/shared/Icon/Icons/PageIcon'; import { PluginIcon } from '@/shared/Icon/Icons/PluginIcon'; import { PlusIcon } from '@/shared/Icon/Icons/PlusIcon'; import { CloseIcon } from '@/shared/Icon/Icons/CloseIcon'; -import { PinOrange } from '@/shared/Icon/Icons/PinOrance'; +import { Pin } from '@/shared/Icon/Icons/Pin'; import type { IconTypes } from '@/types/iconTypes'; @@ -26,7 +26,7 @@ const icons = { 'chevron-left': ChevronLeftIcon, 'chevron-up': ChevronUpIcon, 'chevron-down': ChevronDownIcon, - 'pin-orange': PinOrange, + pin: Pin, plus: PlusIcon, arrow: ArrowIcon, dots: DotsIcon, diff --git a/src/shared/Icon/Icons/PinOrance.tsx b/src/shared/Icon/Icons/Pin.tsx similarity index 75% rename from src/shared/Icon/Icons/PinOrance.tsx rename to src/shared/Icon/Icons/Pin.tsx index d2adc98fe6b76eb2ba296d7f1e563ba6686859ca..f0ee2edd45997180603d7ecedbab5fb24c78daaa 100644 --- a/src/shared/Icon/Icons/PinOrance.tsx +++ b/src/shared/Icon/Icons/Pin.tsx @@ -2,7 +2,7 @@ interface PinOrangeProps { className: string; } -export const PinOrange = ({ className }: PinOrangeProps): JSX.Element => ( +export const Pin = ({ className }: PinOrangeProps): JSX.Element => ( <svg width="18" height="24" @@ -13,8 +13,8 @@ export const PinOrange = ({ className }: PinOrangeProps): JSX.Element => ( > <path d="M9 0C4.575 0 0 3.375 0 9C0 14.325 8.1 22.65 8.475 23.025C8.625 23.175 8.775 23.25 9 23.25C9.225 23.25 9.375 23.175 9.525 23.025C9.9 22.65 18 14.4 18 9C18 3.375 13.425 0 9 0ZM9 12C7.35 12 6 10.65 6 9C6 7.35 7.35 6 9 6C10.65 6 12 7.35 12 9C12 10.65 10.65 12 9 12Z" - fill="#E17221" + fill="currentColor" /> - <circle cx="9.0002" cy="8.99922" r="4.8" fill="#E17221" /> + <circle cx="9.0002" cy="8.99922" r="4.8" fill="currentColor" /> </svg> ); diff --git a/src/types/iconTypes.ts b/src/types/iconTypes.ts index f4db4670cdb514cc27f6e568ab97327fe3cff3b3..c37714cb64db3ae771784cd0978c5858bfdf5536 100644 --- a/src/types/iconTypes.ts +++ b/src/types/iconTypes.ts @@ -13,4 +13,4 @@ export type IconTypes = | 'page' | 'plugin' | 'close' - | 'pin-orange'; + | 'pin'; diff --git a/src/utils/getReduxWrapperWithStore.tsx b/src/utils/getReduxWrapperWithStore.tsx index 1382f962e66a4ec27caaf2c9063fabda071794fe..cf6097bd149b5b91d80092f10941d89ca88471e5 100644 --- a/src/utils/getReduxWrapperWithStore.tsx +++ b/src/utils/getReduxWrapperWithStore.tsx @@ -1,4 +1,4 @@ -import { StoreType } from '@/redux/store'; +import { RootState, StoreType } from '@/redux/store'; import { configureStore } from '@reduxjs/toolkit'; import { Provider } from 'react-redux'; import bioEntityContentsReducer from '@/redux/bioEntityContents/bioEntityContents.slice'; @@ -9,27 +9,12 @@ import mirnasReducer from '@/redux/mirnas/mirnas.slice'; import projectReducer from '@/redux/project/project.slice'; import searchReducer from '@/redux/search/search.slice'; import modelsReducer from '@/redux/models/models.slice'; -import { SearchState } from '@/redux/search/search.types'; -import { ProjectState } from '@/redux/project/project.types'; -import { DrugsState } from '@/redux/drugs/drugs.types'; -import { MirnasState } from '@/redux/mirnas/mirnas.types'; -import { ChemicalsState } from '@/redux/chemicals/chemicals.types'; -import { BioEntityContentsState } from '@/redux/bioEntityContents/bioEntityContents.types'; -import { DrawerState } from '@/redux/drawer/drawer.types'; interface WrapperProps { children: React.ReactNode; } -export type InitialStoreState = { - search?: SearchState; - project?: ProjectState; - drugs?: DrugsState; - mirnas?: MirnasState; - chemicals?: ChemicalsState; - bioEntityContents?: BioEntityContentsState; - drawer?: DrawerState; -}; +export type InitialStoreState = Partial<RootState>; type GetReduxWrapperUsingSliceReducer = (initialState?: InitialStoreState) => { Wrapper: ({ children }: WrapperProps) => JSX.Element;