From 6ca4c514bf3b619a4824e021d99ae485116a9184 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Sun, 21 Nov 2021 17:16:38 +0700 Subject: [PATCH] renamed SWR config file --- src/containers/App.tsx | 6 +++--- src/redux/node/selectors.ts | 3 --- .../providers/{SWRProvider.tsx => SWRConfigProvider.tsx} | 4 +++- 3 files changed, 6 insertions(+), 7 deletions(-) rename src/utils/providers/{SWRProvider.tsx => SWRConfigProvider.tsx} (58%) diff --git a/src/containers/App.tsx b/src/containers/App.tsx index 2120ef19..c69ff69c 100644 --- a/src/containers/App.tsx +++ b/src/containers/App.tsx @@ -10,14 +10,14 @@ import { MainRouter } from '~/containers/main/MainRouter'; import { DragDetectorProvider } from '~/utils/hooks/useDragDetector'; import { useUser } from '~/utils/hooks/user/userUser'; import { UserContextProvider } from '~/utils/context/UserContextProvider'; -import { SWRProvider } from '~/utils/providers/SWRProvider'; +import { SWRConfigProvider } from '~/utils/providers/SWRConfigProvider'; const App: VFC = () => { const user = useUser(); return ( - + @@ -31,7 +31,7 @@ const App: VFC = () => { - + ); }; diff --git a/src/redux/node/selectors.ts b/src/redux/node/selectors.ts index 634b2583..15ddeb5b 100644 --- a/src/redux/node/selectors.ts +++ b/src/redux/node/selectors.ts @@ -1,6 +1,3 @@ import { IState } from '../store'; export const selectNode = (state: IState) => state.node; -export const selectNodeComments = (state: IState) => state.node.comments; -export const selectNodeCurrent = (state: IState) => state.node.current; -export const selectNodeEditor = (state: IState) => state.node.editor; diff --git a/src/utils/providers/SWRProvider.tsx b/src/utils/providers/SWRConfigProvider.tsx similarity index 58% rename from src/utils/providers/SWRProvider.tsx rename to src/utils/providers/SWRConfigProvider.tsx index 1f73051b..99382470 100644 --- a/src/utils/providers/SWRProvider.tsx +++ b/src/utils/providers/SWRConfigProvider.tsx @@ -5,4 +5,6 @@ const config: SWRConfiguration = { revalidateOnFocus: false, }; -export const SWRProvider: FC = ({ children }) => {children}; +export const SWRConfigProvider: FC = ({ children }) => ( + {children} +);