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

Merge branch 'feature/MIN-96-open-drawer-after-search' into 'development'

Resolve MIN-96 "Feature/ open drawer after search"

Closes MIN-96

See merge request !30
parents 62cac953 8c466924
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...,!30Resolve MIN-96 "Feature/ open drawer after search"
Pipeline #79677 failed
export type Variant = 'expandable' | 'non-expandable';
import { Icon } from '@/shared/Icon';
import { Variant } from './AccordionItemButton.types';
export const getIcon = (variant: Variant): JSX.Element => {
const variantsIcons: Record<Variant, JSX.Element> = {
expandable: <Icon name="chevron-down" className="arrow-button h-6 w-6 fill-font-500" />,
'non-expandable': <Icon name="chevron-right" className="h-6 w-6 fill-font-500" />,
};
return variantsIcons[variant];
};
import { store } from '@/redux/store';
import { configureStore } from '@reduxjs/toolkit';
import { Provider } from 'react-redux';
import bioEntityContentsReducer from '@/redux/bioEntityContents/bioEntityContents.slice';
import chemicalsReducer from '@/redux/chemicals/chemicals.slice';
import drawerReducer from '@/redux/drawer/drawer.slice';
import drugsReducer from '@/redux/drugs/drugs.slice';
import mirnasReducer from '@/redux/mirnas/mirnas.slice';
import projectReducer from '@/redux/project/project.slice';
import searchReducer from '@/redux/search/search.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;
};
type GetReduxWrapperUsingSliceReducer = (initialState?: InitialStoreState) => {
Wrapper: ({ children }: WrapperProps) => JSX.Element;
store: typeof store;
};
export const getReduxWrapperWithStore: GetReduxWrapperUsingSliceReducer = (
preloadedState: InitialStoreState = {},
) => {
const testStore = configureStore({
reducer: {
search: searchReducer,
project: projectReducer,
drugs: drugsReducer,
mirnas: mirnasReducer,
chemicals: chemicalsReducer,
bioEntityContents: bioEntityContentsReducer,
drawer: drawerReducer,
},
preloadedState,
});
const Wrapper = ({ children }: WrapperProps): JSX.Element => (
<Provider store={testStore}>{children}</Provider>
);
return { Wrapper, store: testStore };
};
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