Skip to content

Commit 428c204

Browse files
committed
Move directory of homepage to be root
1 parent 3a29c0a commit 428c204

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

frontend/src/app/(auth)/page.tsx renamed to frontend/src/app/(auth)/leetcode-dashboard/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

33
import { useAuth } from "@/components/auth/AuthContext";
4-
import LandingPage from "./components/landing-page/LandingPage";
5-
// import Dashboard from "./components/dashboard/Dashboard";
6-
import LeetcodeDashboard from "./leetcode-dashboard/LeetcodeDashboard";
4+
import LandingPage from "@/app/(home)/components/landing-page/LandingPage";
5+
import LeetcodeDashboard from "./LeetcodeDashboard";
76

87
const Home = () => {
98
const { token } = useAuth();
File renamed without changes.
File renamed without changes.

frontend/src/app/home/components/landing-page/LandingPage.tsx renamed to frontend/src/app/(home)/components/landing-page/LandingPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import CodeSnippet from "@/app/home/components/code-snippet/CodeSnippetHighlight";
1+
import CodeSnippet from "@/app/(home)/components/code-snippet/CodeSnippetHighlight";
22
import { Button } from "@/components/ui/button";
33
import { Card, CardContent } from "@/components/ui/card";
4-
import GoogleIcon from "@/app/home/components/icon/GoogleIcon";
4+
import GoogleIcon from "@/app/(home)/components/icon/GoogleIcon";
55
import { useAuth } from "@/components/auth/AuthContext";
66
import { useGoogleLogin } from "@react-oauth/google";
77
import { useRouter } from "next/navigation";
@@ -14,7 +14,7 @@ const LandingPage = () => {
1414
const googleLogin = useGoogleLogin({
1515
onSuccess: (response) => {
1616
login(response);
17-
router.push("/"); // Redirect to dashboard after successful login
17+
router.push("/leetcode-dashboard"); // Redirect to dashboard after successful login
1818
},
1919
onError: (error) => {
2020
console.error("Login Failed:", error);
@@ -24,7 +24,7 @@ const LandingPage = () => {
2424
// Trigger OAuth pop up only if user is not authenticated (token is not present)
2525
const handleLogin = () => {
2626
if (token) {
27-
router.push("/");
27+
router.push("/leetcode-dashboard");
2828
} else {
2929
googleLogin();
3030
}
File renamed without changes.

frontend/src/app/home/page.tsx renamed to frontend/src/app/(home)/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

3-
import Navbar from "@/app/home/components/navbar/Navbar";
4-
import LandingPage from "@/app/home/components/landing-page/LandingPage";
3+
import Navbar from "@/app/(home)/components/navbar/Navbar";
4+
import LandingPage from "@/app/(home)/components/landing-page/LandingPage";
55

66
const Home = () => {
77
return (

0 commit comments

Comments
 (0)