Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
LahariReddyMuthyala committed Nov 9, 2024
1 parent ecbd330 commit 147d4f0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "collaborators-portal",
"version": "0.1.0",
"private": true,
"homepage": "https://npnl.github.io/collaborators-console-frontend",
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Admins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const Admins: React.FC = () => {
};
const handleDeleteAdmin = async (email: string) => {
if (!getCurrentUser()) {
navigate("/login");
navigate("login");
return;
}
const token = await getCurrentUserToken();
Expand Down
2 changes: 1 addition & 1 deletion src/components/Collaborators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Collaborators: React.FC = () => {

const fetchCollaborators = async () => {
if (!auth.currentUser) {
navigate("/login");
navigate("login");
return;
}
const token = await getCurrentUserToken();
Expand Down
8 changes: 7 additions & 1 deletion src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ const Home: React.FC<HomeProps> = ({ isAdmin }) => {

useEffect(() => {
if (!auth.currentUser) {
navigate("/login");
navigate("login");
}
}, []);

useEffect(() => {
if (!auth.currentUser) {
navigate("login");
} else {
fetchUserDetails();
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const NavigationBar: React.FC<NavBarProps> = ({ isAdmin }) => {

const handleLogout = async () => {
await signOut(auth);
navigate("/login");
navigate("login");
};

useEffect(() => {
Expand Down

0 comments on commit 147d4f0

Please sign in to comment.