This commit is contained in:
fro1991
2025-02-01 22:15:17 +07:00
parent c14f9129c4
commit d216a5bb8c
2 changed files with 4 additions and 3 deletions

View File

@ -3,8 +3,7 @@ import { getData, setData } from '@/utils';
import { type AuthModel } from './_models';
// import https from 'https'
const AUTH_LOCAL_STORAGE_KEY = `${import.meta.env.VITE_APP_NAME}-auth-v${import.meta.env.VITE_APP_VERSION
}`;
const AUTH_LOCAL_STORAGE_KEY = `${import.meta.env.VITE_APP_NAME}-auth-v${import.meta.env.VITE_APP_VERSION}`;
const getAuth = (): AuthModel | undefined => {
try {

View File

@ -160,7 +160,9 @@ const LogActivityContextProvider = ({ children }: { children: React.ReactNode })
);
const doExportData = async (sorting: any, filter: any) => {
const user = localStorage.getItem('brillian-bri-tl-auth-v1=9.1.1');
const AUTH_LOCAL_STORAGE_KEY = `${import.meta.env.VITE_APP_NAME}-auth-v${import.meta.env.VITE_APP_VERSION}`;
const user = localStorage.getItem(AUTH_LOCAL_STORAGE_KEY);
const parsedUser = user ? JSON.parse(user) : null;
sorting = sorting.length === 0 ? [{ id: 'user_activity.created_at', desc: false }] : sorting;
filter = filter && filter.length > 0 ? filter : [];