Skip to content

Commit f146557

Browse files
committed
removed add project temperoily
1 parent 1cdc72c commit f146557

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

components/repeto/AddProjectFAB.tsx

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,13 @@
11
"use client";
22

3-
import { useEffect, useState } from "react";
4-
import { User } from "firebase/auth"; // Adjust the import path based on your Firebase setup
53
import { useRouter } from "next/navigation";
64
import { Plus } from "lucide-react";
7-
import { onAuthStateChanged } from "@/lib/firebase/auth";
85

96
const AddProjectFAB = () => {
107
const router = useRouter();
11-
const [user, setUser] = useState<User | null>(null);
12-
13-
useEffect(() => {
14-
const unsubscribe = onAuthStateChanged((currentUser) => {
15-
setUser(currentUser);
16-
});
17-
return () => unsubscribe();
18-
}, []);
198

209
const handleClick = () => {
21-
if (user) {
22-
router.push("/add-project");
23-
} else {
24-
router.push("/login"); // Redirect to login if not authenticated
25-
}
10+
router.push("/add-project"); // 🚀 No authentication check
2611
};
2712

2813
return (

0 commit comments

Comments
 (0)