|
|
@ -1,12 +1,11 @@
|
|
|
|
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
|
|
import { createAsyncThunk } from '@reduxjs/toolkit';
|
|
|
|
import type { TypedUseSelectorHook } from 'react-redux';
|
|
|
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
|
|
|
|
|
|
|
|
|
|
|
import type { AppDispatch, RootState } from './store';
|
|
|
|
import type { AppDispatch, RootState } from './store';
|
|
|
|
|
|
|
|
|
|
|
|
export const useAppDispatch: () => AppDispatch = useDispatch;
|
|
|
|
export const useAppDispatch = useDispatch.withTypes<AppDispatch>();
|
|
|
|
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
|
|
|
export const useAppSelector = useSelector.withTypes<RootState>();
|
|
|
|
|
|
|
|
|
|
|
|
export const createAppAsyncThunk = createAsyncThunk.withTypes<{
|
|
|
|
export const createAppAsyncThunk = createAsyncThunk.withTypes<{
|
|
|
|
state: RootState;
|
|
|
|
state: RootState;
|
|
|
|