👔 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 React, { useState } from "react";
|
||||
import { delayButtonClick } from "../lib/delayButtonClick";
|
||||
import { routes } from "../config/routes";
|
||||
|
||||
export const AcmeLogo = () => {
|
||||
return (
|
||||
@ -29,7 +30,6 @@ export const AcmeLogo = () => {
|
||||
};
|
||||
|
||||
const NavbarUI = () => {
|
||||
const router = useRouter();
|
||||
const pathNameNow = usePathname();
|
||||
|
||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||
@ -37,23 +37,23 @@ const NavbarUI = () => {
|
||||
const navbarItems = [
|
||||
{
|
||||
title: "Home",
|
||||
route: "/",
|
||||
route: routes.home,
|
||||
},
|
||||
{
|
||||
title: "Explore",
|
||||
route: "/explore",
|
||||
route: routes.explore,
|
||||
},
|
||||
{
|
||||
title: "Trending",
|
||||
route: "/trending",
|
||||
route: routes.trending,
|
||||
},
|
||||
{
|
||||
title: "Genres",
|
||||
route: "/genre",
|
||||
route: routes.genres,
|
||||
},
|
||||
{
|
||||
title: "Schedule",
|
||||
route: "/schedule",
|
||||
route: routes.schedule,
|
||||
},
|
||||
];
|
||||
|
||||
@ -88,7 +88,7 @@ const NavbarUI = () => {
|
||||
</NavbarContent>
|
||||
<NavbarContent justify="end">
|
||||
<NavbarItem className="hidden lg:flex">
|
||||
<Link href="/login" className="font-medium">
|
||||
<Link href={routes.login} className="font-medium">
|
||||
Login
|
||||
</Link>
|
||||
</NavbarItem>
|
||||
@ -98,7 +98,7 @@ const NavbarUI = () => {
|
||||
variant="solid"
|
||||
radius="sm"
|
||||
as={Link}
|
||||
href="/sign-up"
|
||||
href={routes.signup}
|
||||
>
|
||||
Sign Up
|
||||
</Button>
|
||||
|
||||
@ -4,6 +4,7 @@ import { Card, Divider, Link } from "@heroui/react";
|
||||
import React from "react";
|
||||
import EmailForm from "./EmailForm";
|
||||
import ContinueWithProviders from "./ContinueWithProviders";
|
||||
import { routes } from "@/shared/config/routes";
|
||||
|
||||
const LoginCard = () => {
|
||||
return (
|
||||
@ -16,7 +17,7 @@ const LoginCard = () => {
|
||||
{/* Sign up link */}
|
||||
<p className="text-center text-neutral-300 text-sm font-light mt-5">
|
||||
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
|
||||
</Link>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user