first commit

This commit is contained in:
Harish Sargar
2025-04-01 20:28:04 +05:30
commit 0e1281aaa8
313 changed files with 85792 additions and 0 deletions

23
src/utils/tokenService.js Normal file
View File

@@ -0,0 +1,23 @@
const TOKEN_KEY = 'authToken';
export const setToken = (token) => {
localStorage.setItem(TOKEN_KEY, token);
};
export const getToken = () => {
return localStorage.getItem(TOKEN_KEY);
};
export const removeToken = () => {
localStorage.removeItem(TOKEN_KEY);
};
export const isTokenAvailable = () => {
return !!localStorage.getItem(TOKEN_KEY); // Returns true if token exists
};