Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Quyenld9699 committed Aug 13, 2024
1 parent 49d9fe2 commit cbe07aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { ImageRounded, InsertDriveFile } from '@mui/icons-material';
import { SvgComponent } from 'crypto-token-icon';

export * from './imagePath';
export * from './contractAddress';

export const KeyLocalStorage = {
THEME: 'theme',
ACCESS_TOKEN: 'access_token',
Expand All @@ -20,6 +23,3 @@ export const fileIcon: { [k: string]: SvgComponent } = {
'image/svg': ImageRounded,
unknown: InsertDriveFile,
};

export * from './imagePath';
export * from './contractAddress';
2 changes: 1 addition & 1 deletion lib/states/theme/state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { deepmerge } from '@mui/utils';
export const FontInter = '"Inter", sans-serif';
export const FontRaleway = '"Raleway", sans-serif';

export const themeMode = atomWithStorage<THEME_MODE>(KeyLocalStorage.THEME, 'light');
export const themeMode = atomWithStorage<THEME_MODE>('theme', 'light');
export const themeConfig = atom((get) => {
const mode = get(themeMode);
const _t = createTheme(getThemeConfig(mode));
Expand Down
2 changes: 1 addition & 1 deletion lib/states/user/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { KeyLocalStorage } from 'lib/constants';
import { checkValidAccessToken } from './utils';
import { verifyJwt } from 'lib/services';

export const accessToken = atomWithStorage(KeyLocalStorage.ACCESS_TOKEN, '');
export const accessToken = atomWithStorage('access_token', '');
export const addressWallet = atom<string>('');

export const validLogin = atom(async (get) => {
Expand Down
1 change: 1 addition & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import App from './App.tsx';
import { AppStateProvider, IconMenuExplorer, IconUser, Layout } from 'lib/main.ts';
import { Dashboard } from '@mui/icons-material';
import { BrowserRouter } from 'react-router-dom';
import { KeyLocalStorage } from 'lib/main.ts';
import Router from './routes.tsx';

ReactDOM.createRoot(document.getElementById('root')!).render(
Expand Down

0 comments on commit cbe07aa

Please sign in to comment.