👔 create config for routing
This commit is contained in:
7
app/(main)/genres/page.tsx
Normal file
7
app/(main)/genres/page.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const page = () => {
|
||||||
|
return <div>Genre Page</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default page;
|
||||||
7
app/(main)/schedule/page.tsx
Normal file
7
app/(main)/schedule/page.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const page = () => {
|
||||||
|
return <div>Schedule Page</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default page;
|
||||||
7
app/(main)/trending/page.tsx
Normal file
7
app/(main)/trending/page.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const page = () => {
|
||||||
|
return <div>Trending Page</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default page;
|
||||||
9
shared/config/routes.ts
Normal file
9
shared/config/routes.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export const routes = {
|
||||||
|
home: "/",
|
||||||
|
login: "/log-in",
|
||||||
|
signup: "/sign-up",
|
||||||
|
explore: "/explore",
|
||||||
|
trending: "/trending",
|
||||||
|
genres: "/genres",
|
||||||
|
schedule: "/schedule",
|
||||||
|
};
|
||||||
@ -14,6 +14,7 @@ import {
|
|||||||
import { usePathname, useRouter } from "next/navigation";
|
import { usePathname, useRouter } from "next/navigation";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { delayButtonClick } from "../lib/delayButtonClick";
|
import { delayButtonClick } from "../lib/delayButtonClick";
|
||||||
|
import { routes } from "../config/routes";
|
||||||
|
|
||||||
export const AcmeLogo = () => {
|
export const AcmeLogo = () => {
|
||||||
return (
|
return (
|
||||||
@ -29,7 +30,6 @@ export const AcmeLogo = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const NavbarUI = () => {
|
const NavbarUI = () => {
|
||||||
const router = useRouter();
|
|
||||||
const pathNameNow = usePathname();
|
const pathNameNow = usePathname();
|
||||||
|
|
||||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||||
@ -37,23 +37,23 @@ const NavbarUI = () => {
|
|||||||
const navbarItems = [
|
const navbarItems = [
|
||||||
{
|
{
|
||||||
title: "Home",
|
title: "Home",
|
||||||
route: "/",
|
route: routes.home,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Explore",
|
title: "Explore",
|
||||||
route: "/explore",
|
route: routes.explore,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Trending",
|
title: "Trending",
|
||||||
route: "/trending",
|
route: routes.trending,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Genres",
|
title: "Genres",
|
||||||
route: "/genre",
|
route: routes.genres,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Schedule",
|
title: "Schedule",
|
||||||
route: "/schedule",
|
route: routes.schedule,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ const NavbarUI = () => {
|
|||||||
</NavbarContent>
|
</NavbarContent>
|
||||||
<NavbarContent justify="end">
|
<NavbarContent justify="end">
|
||||||
<NavbarItem className="hidden lg:flex">
|
<NavbarItem className="hidden lg:flex">
|
||||||
<Link href="/login" className="font-medium">
|
<Link href={routes.login} className="font-medium">
|
||||||
Login
|
Login
|
||||||
</Link>
|
</Link>
|
||||||
</NavbarItem>
|
</NavbarItem>
|
||||||
@ -98,7 +98,7 @@ const NavbarUI = () => {
|
|||||||
variant="solid"
|
variant="solid"
|
||||||
radius="sm"
|
radius="sm"
|
||||||
as={Link}
|
as={Link}
|
||||||
href="/sign-up"
|
href={routes.signup}
|
||||||
>
|
>
|
||||||
Sign Up
|
Sign Up
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { Card, Divider, Link } from "@heroui/react";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import EmailForm from "./EmailForm";
|
import EmailForm from "./EmailForm";
|
||||||
import ContinueWithProviders from "./ContinueWithProviders";
|
import ContinueWithProviders from "./ContinueWithProviders";
|
||||||
|
import { routes } from "@/shared/config/routes";
|
||||||
|
|
||||||
const LoginCard = () => {
|
const LoginCard = () => {
|
||||||
return (
|
return (
|
||||||
@ -16,7 +17,7 @@ const LoginCard = () => {
|
|||||||
{/* Sign up link */}
|
{/* Sign up link */}
|
||||||
<p className="text-center text-neutral-300 text-sm font-light mt-5">
|
<p className="text-center text-neutral-300 text-sm font-light mt-5">
|
||||||
Don't have an account?{" "}
|
Don't have an account?{" "}
|
||||||
<Link className="text-sm font-medium" href="/sign-up">
|
<Link className="text-sm font-medium" href={routes.signup}>
|
||||||
Sign Up
|
Sign Up
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user