Refactor
This commit is contained in:
11
src/App.tsx
11
src/App.tsx
@@ -7,6 +7,7 @@ import {
|
||||
} from '@mantine/core';
|
||||
import { useLocalStorage } from '@mantine/hooks';
|
||||
import { ModalsProvider } from '@mantine/modals';
|
||||
import { useQueryAPI } from 'hooks';
|
||||
import { useEffect } from 'react';
|
||||
import {
|
||||
Route,
|
||||
@@ -14,24 +15,22 @@ import {
|
||||
createBrowserRouter,
|
||||
createRoutesFromElements,
|
||||
} from 'react-router-dom';
|
||||
import ThemeProvider from './components/ThemeProvider';
|
||||
import { useQueryAPI } from './hooks/useAPI';
|
||||
import Homepage from './pages/homepage/Homepage';
|
||||
import Settings from './pages/settings/Settings';
|
||||
import { ThemeProvider } from './components';
|
||||
import '@mantine/core/styles.css'; //import Mantine V7 styles needed by MRT
|
||||
import '@mantine/dates/styles.css'; //if using mantine date picker features
|
||||
import 'mantine-react-table/styles.css'; //import MRT styles
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
||||
import { appTheme } from 'contexts';
|
||||
import { useAtom } from 'jotai';
|
||||
import { appTheme } from './contexts/theme';
|
||||
import './index.css';
|
||||
import { Homepage, Settings } from 'pages';
|
||||
|
||||
function App() {
|
||||
const { data, isFetched } = useQueryAPI({
|
||||
endpoint: 'api/themes',
|
||||
});
|
||||
|
||||
const [themeName, setThemeName] = useLocalStorage<any>({
|
||||
const [themeName, _] = useLocalStorage<any>({
|
||||
key: 'theme',
|
||||
defaultValue: 'blackboard',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user