mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-18 02:55:51 +00:00
Create dedicated store module
This commit is contained in:
parent
9c1052c10b
commit
11bbef3aca
@ -3,8 +3,8 @@ import { Provider } from 'react-redux';
|
||||
import { BrowserRouter } from 'react-router';
|
||||
import pack from '../package.json';
|
||||
import { container } from './container';
|
||||
import { setUpStore } from './container/store';
|
||||
import { register as registerServiceWorker } from './serviceWorkerRegistration';
|
||||
import { setUpStore } from './store';
|
||||
import './tailwind.css';
|
||||
|
||||
const store = setUpStore();
|
||||
|
||||
@ -3,7 +3,7 @@ import { memoizeWith } from '@shlinkio/data-manipulation';
|
||||
import type { ShlinkHealth } from '@shlinkio/shlink-web-component/api-contract';
|
||||
import { useCallback } from 'react';
|
||||
import type { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder';
|
||||
import { useAppDispatch, useAppSelector } from '../../container/store';
|
||||
import { useAppDispatch, useAppSelector } from '../../store';
|
||||
import { createAsyncThunk } from '../../utils/helpers/redux';
|
||||
import { versionToPrintable, versionToSemVer as toSemVer } from '../../utils/helpers/version';
|
||||
import type { SelectedServer, ServerWithId } from '../data';
|
||||
|
||||
@ -2,9 +2,9 @@ import { configureStore } from '@reduxjs/toolkit';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import type { RLSOptions } from 'redux-localstorage-simple';
|
||||
import { load, save } from 'redux-localstorage-simple';
|
||||
import { initReducers } from '../reducers';
|
||||
import type { ShlinkState } from '../container/types';
|
||||
import { migrateDeprecatedSettings } from '../settings/helpers';
|
||||
import type { ShlinkState } from './types';
|
||||
import { initReducers } from './reducers';
|
||||
|
||||
const localStorageConfig: RLSOptions = {
|
||||
states: ['settings', 'servers'],
|
||||
@ -3,8 +3,8 @@ import { render } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import type { PropsWithChildren, ReactElement } from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { setUpStore } from '../../src/container/store';
|
||||
import type { ShlinkState } from '../../src/container/types';
|
||||
import { setUpStore } from '../../src/store';
|
||||
|
||||
export const renderWithEvents = (element: ReactElement, options?: RenderOptions) => ({
|
||||
user: userEvent.setup(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user