menu update
This commit is contained in:
parent
2da1dfcfde
commit
3c46ff58e6
9
Websites/jefes-nextjs/app/Bar/page.tsx
Normal file
9
Websites/jefes-nextjs/app/Bar/page.tsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
const page = () => {
|
||||||
|
return (
|
||||||
|
<div>page</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default page
|
||||||
@ -1,4 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import Link from 'next/link'
|
||||||
|
import MenuLinks from './MenuLinks'
|
||||||
|
|
||||||
const MenuBar = () => {
|
const MenuBar = () => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -1,24 +1,44 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
import clsx from 'clsx';
|
import clsx from "clsx";
|
||||||
import Link from 'next/link';
|
import Link from "next/link";
|
||||||
import { usePathname } from 'next/navigation';
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
const links = [
|
const links = [
|
||||||
{name: 'Appetizers', href: '/menu'},
|
{ name: "Appetizers", href: "/menu" },
|
||||||
{name: 'Brunch', href: '/menu/brunch'},
|
{ name: "Brunch", href: "/menu/Brunch" },
|
||||||
{name: 'Lunch', href: '/menu/lunch'},
|
{ name: "Lunch", href: "/menu/Lunch" },
|
||||||
{name: 'Dinner', href: '/menu/dinner'},
|
{ name: "Dinner", href: "/menu/Dinner" },
|
||||||
{name: 'Beverages', href: '/menu/beverages'},
|
{ name: "Beverages", href: "/menu/Beverages" },
|
||||||
{name: 'Beverages', href: '/menu/beverages'},
|
{ name: "Bar", href: "/menu/Bar" },
|
||||||
|
];
|
||||||
]
|
|
||||||
|
|
||||||
const MenuLinks = () => {
|
const MenuLinks = () => {
|
||||||
return (
|
const pathname = usePathname();
|
||||||
<div>MenuLinks</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default MenuLinks
|
return (
|
||||||
|
<>
|
||||||
|
{links.map((link) => {
|
||||||
|
// const LinkIcon = link.icon;
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
key={link.name}
|
||||||
|
href={link.href}
|
||||||
|
className={clsx(
|
||||||
|
"flex h-[48px] grow items-center justify-center gap-2 bg-transparent p-3 text-xl font-semibold hover:text-red-700 md:flex-none md:justify-start md:p-2 md:px-3",
|
||||||
|
{
|
||||||
|
"text-red-700": pathname === link.href,
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{/* <LinkIcon className="w-6" /> */}
|
||||||
|
<p className="hidden md:block">{link.name}</p>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MenuLinks;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
|
|
||||||
const page = () => {
|
const page = () => {
|
||||||
return (
|
return (
|
||||||
<div>page</div>
|
<div>Beverages</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
|
|
||||||
const page = () => {
|
const page = () => {
|
||||||
return (
|
return (
|
||||||
<div>page</div>
|
<div>Brunch</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
import MenuLinks from "../components/MenuBar/MenuLinks";
|
||||||
|
|
||||||
const layout = ({ children }: { children: React.ReactNode }) => {
|
const layout = ({ children }: { children: React.ReactNode }) => {
|
||||||
return (
|
return (
|
||||||
@ -22,8 +23,10 @@ const layout = ({ children }: { children: React.ReactNode }) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex flex-row justify-evenly pt-4">
|
||||||
<div className="flex-grow p-6 md:overflow-y-auto md:p-12 bg-paintbg">{children}</div>
|
<MenuLinks />
|
||||||
|
</div>
|
||||||
|
<div className="flex-grow p-6 md:overflow-y-auto md:p-12">{children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,9 +5,7 @@ import Image from "next/image";
|
|||||||
const menu = () => {
|
const menu = () => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col relative justify-center items-center ">
|
<div className="flex flex-col relative justify-center items-center ">
|
||||||
<div>
|
<Appetizers />
|
||||||
<Appetizers />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user