Skip to content

Commit

Permalink
easy
Browse files Browse the repository at this point in the history
  • Loading branch information
0-don committed Dec 18, 2023
1 parent cdc88af commit 6812f59
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion web/public/images/logo_mini.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions web/src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ type LocaleLayoutProps = {
export default async function LocaleLayout({
children,
params,
...rest
}: LocaleLayoutProps) {
console.log(rest);
return (
<html lang={params.locale} suppressHydrationWarning className="h-full">
<head>
<title>Meal Manager</title>
<title>{process.env.NEXT_PUBLIC_BRAND_NAME}</title>
</head>
<body className="h-full">
<NextIntlClientProvider
Expand Down
18 changes: 10 additions & 8 deletions web/src/components/container/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ import {
NavbarMenuToggle,
Navbar as NextUINavbar,
} from "@nextui-org/navbar";
import { GiHotMeal } from "@react-icons/all-files/gi/GiHotMeal";
import React from "react";
import logo_mini from "@public/images/logo_mini.svg";
import Image from "next/image";
import React, { ReactElement } from "react";
import { Profile } from "./Profile";

interface NavbarProps {
locale?: string;
children?: ReactElement;
}

const LINKS = [
{ link: "/", name: "Home" },
{ link: "/about", name: "About" },
];

export const Navbar: React.FC<NavbarProps> = ({ locale }) => {

export const Navbar: React.FC<NavbarProps> = ({ locale, children }) => {
console.log(JSON.stringify(children));
const Items = (
<>
<LanguageSwitch locale={locale} />
Expand Down Expand Up @@ -56,19 +58,19 @@ export const Navbar: React.FC<NavbarProps> = ({ locale }) => {
],
}}
>
<NavbarBrand as="li" className="max-w-fit space-x-1">
<NavbarBrand as="li" className="max-w-fit">
<Link
color="foreground"
className="flex items-center text-2xl font-bold"
className="flex items-center text-2xl font-bold space-x-0.5"
href="/"
>
<GiHotMeal className="text-4xl text-primary" />
<Image src={logo_mini} alt="logo" width={40} height={40} />
<span>{process.env.NEXT_PUBLIC_BRAND_NAME}</span>
</Link>
</NavbarBrand>
<NavbarContent className="hidden gap-4 sm:flex">
{LINKS.map(({ link, name }) => (
<NavbarItem key={link} isActive>
<NavbarItem key={link}>
<ELink href={link} size="lg">
{name}
</ELink>
Expand Down

0 comments on commit 6812f59

Please sign in to comment.