Skip to content
Snippets Groups Projects
Commit fde4c9a8 authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

refactor(pr fixes): pr fixes

parent ab2c7a70
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!31feat(results 2nd step): created dummy component for results
Pipeline #79706 passed
...@@ -6,7 +6,7 @@ interface PinsListItemProps { ...@@ -6,7 +6,7 @@ interface PinsListItemProps {
export const PinsListItem = ({ name }: PinsListItemProps): JSX.Element => ( export const PinsListItem = ({ name }: PinsListItemProps): JSX.Element => (
<div className="flex flex-row justify-between pt-4"> <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> <p className="w-full text-left">{name}</p>
<Icon name="chevron-right" className="h-6 w-6 shrink-0" /> <Icon name="chevron-right" className="h-6 w-6 shrink-0" />
</div> </div>
......
import { DrawerHeadingBackwardButton } from '@/shared/DrawerHeadingBackwardButton'; import { DrawerHeadingBackwardButton } from '@/shared/DrawerHeadingBackwardButton';
import { PinsList } from './PinsList'; import { PinsList } from './PinsList';
import { PinItem } from './PinsList/PinsList.types';
const PINS_LIST = [ const PINS_LIST: PinItem[] = [
{ name: 'Glyceraldehyde-3-phosphate dehydrogenase' }, { name: 'Glyceraldehyde-3-phosphate dehydrogenase' },
{ name: 'D-3-phosphoglycerate dehydrogenase' }, { name: 'D-3-phosphoglycerate dehydrogenase' },
{ name: 'Glutathione reductase, mitochondrial' }, { name: 'Glutathione reductase, mitochondrial' },
......
import { useAppDispatch } from '@/redux/hooks/useAppDispatch'; import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
import { closeDrawer } from '@/redux/drawer/drawer.slice'; import { closeDrawer } from '@/redux/drawer/drawer.slice';
import { IconButton } from '@/shared/IconButton'; import { IconButton } from '@/shared/IconButton';
import { BACK_BUTTON_ROLE, CLOSE_BUTTON_ROLE } from './DrawerHeadingBackwardButton.constants';
export const CLOSE_BUTTON_ROLE = 'close-drawer-button';
export const BACK_BUTTON_ROLE = 'back-button';
export interface DrawerHeadingBackwardButtonProps { export interface DrawerHeadingBackwardButtonProps {
title: string; title: string;
......
export const CLOSE_BUTTON_ROLE = 'close-drawer-button';
export const BACK_BUTTON_ROLE = 'back-button';
...@@ -12,7 +12,7 @@ import { PageIcon } from '@/shared/Icon/Icons/PageIcon'; ...@@ -12,7 +12,7 @@ import { PageIcon } from '@/shared/Icon/Icons/PageIcon';
import { PluginIcon } from '@/shared/Icon/Icons/PluginIcon'; import { PluginIcon } from '@/shared/Icon/Icons/PluginIcon';
import { PlusIcon } from '@/shared/Icon/Icons/PlusIcon'; import { PlusIcon } from '@/shared/Icon/Icons/PlusIcon';
import { CloseIcon } from '@/shared/Icon/Icons/CloseIcon'; 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'; import type { IconTypes } from '@/types/iconTypes';
...@@ -26,7 +26,7 @@ const icons = { ...@@ -26,7 +26,7 @@ const icons = {
'chevron-left': ChevronLeftIcon, 'chevron-left': ChevronLeftIcon,
'chevron-up': ChevronUpIcon, 'chevron-up': ChevronUpIcon,
'chevron-down': ChevronDownIcon, 'chevron-down': ChevronDownIcon,
'pin-orange': PinOrange, pin: Pin,
plus: PlusIcon, plus: PlusIcon,
arrow: ArrowIcon, arrow: ArrowIcon,
dots: DotsIcon, dots: DotsIcon,
......
...@@ -2,7 +2,7 @@ interface PinOrangeProps { ...@@ -2,7 +2,7 @@ interface PinOrangeProps {
className: string; className: string;
} }
export const PinOrange = ({ className }: PinOrangeProps): JSX.Element => ( export const Pin = ({ className }: PinOrangeProps): JSX.Element => (
<svg <svg
width="18" width="18"
height="24" height="24"
...@@ -13,8 +13,8 @@ export const PinOrange = ({ className }: PinOrangeProps): JSX.Element => ( ...@@ -13,8 +13,8 @@ export const PinOrange = ({ className }: PinOrangeProps): JSX.Element => (
> >
<path <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" 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> </svg>
); );
...@@ -13,4 +13,4 @@ export type IconTypes = ...@@ -13,4 +13,4 @@ export type IconTypes =
| 'page' | 'page'
| 'plugin' | 'plugin'
| 'close' | 'close'
| 'pin-orange'; | 'pin';
import { StoreType } from '@/redux/store'; import { RootState, StoreType } from '@/redux/store';
import { configureStore } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit';
import { Provider } from 'react-redux'; import { Provider } from 'react-redux';
import bioEntityContentsReducer from '@/redux/bioEntityContents/bioEntityContents.slice'; import bioEntityContentsReducer from '@/redux/bioEntityContents/bioEntityContents.slice';
...@@ -9,27 +9,12 @@ import mirnasReducer from '@/redux/mirnas/mirnas.slice'; ...@@ -9,27 +9,12 @@ import mirnasReducer from '@/redux/mirnas/mirnas.slice';
import projectReducer from '@/redux/project/project.slice'; import projectReducer from '@/redux/project/project.slice';
import searchReducer from '@/redux/search/search.slice'; import searchReducer from '@/redux/search/search.slice';
import modelsReducer from '@/redux/models/models.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 { interface WrapperProps {
children: React.ReactNode; children: React.ReactNode;
} }
export type InitialStoreState = { export type InitialStoreState = Partial<RootState>;
search?: SearchState;
project?: ProjectState;
drugs?: DrugsState;
mirnas?: MirnasState;
chemicals?: ChemicalsState;
bioEntityContents?: BioEntityContentsState;
drawer?: DrawerState;
};
type GetReduxWrapperUsingSliceReducer = (initialState?: InitialStoreState) => { type GetReduxWrapperUsingSliceReducer = (initialState?: InitialStoreState) => {
Wrapper: ({ children }: WrapperProps) => JSX.Element; Wrapper: ({ children }: WrapperProps) => JSX.Element;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment