Skip to content

Commit

Permalink
feat: added loading screen till username
Browse files Browse the repository at this point in the history
  • Loading branch information
RupaakSrinivas committed Dec 31, 2023
1 parent c52f3b5 commit 865b9c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const App: React.FC = () => {
};

initializeApp(firebaseConfig);
const { initializeFromLocalStorge, login, isLoggedIn } = useAuthStore();
const { initializeFromLocalStorge, login, isLoggedIn, name } = useAuthStore();
const { showProfile } = useShowProfileStore();
const { isLoading } = useLoadingStore();

Expand Down Expand Up @@ -59,7 +59,7 @@ const App: React.FC = () => {

return (
<Template>
{isLoading ? <Loader /> : isLoggedIn ? <Dashboard /> : <LoginPage />}
{(isLoading || name==="isloading39084*+/46848/*/") ? <Loader /> : isLoggedIn ? <Dashboard /> : <LoginPage />}
{showProfile && <Profile />}
</Template>
);
Expand Down
2 changes: 1 addition & 1 deletion src/store/authStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const useAuthStore = create<AuthStore>((set) => ({
profile: "",
username: null,
email: "",
name: "",
name: "isloading39084*+/46848/*/",
token: "",
timetable: {},
regNo: "", // Initialize timetable as an empty object
Expand Down

0 comments on commit 865b9c4

Please sign in to comment.