diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index 0813496..bc93912 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -3,43 +3,43 @@ import "@/styles/global.css"; import "flag-icons/css/flag-icons.css"; import { NextIntlClientProvider } from "next-intl"; import { getMessages, getTranslations } from "next-intl/server"; -import { MainContainer, ThemeProvider } from "@/components"; +import { MainContainer, Theme } from "@/components"; import { Analytics } from "@vercel/analytics/next"; const inter = Inter({ subsets: ["latin"] }); export interface LocaleLayoutProps { - children: React.ReactNode; - params: { locale: string }; + children: React.ReactNode; + params: { locale: string }; } export async function generateMetadata({ - params: { locale }, + params: { locale }, }: { params: LocaleLayoutProps["params"] }) { - const t = await getTranslations({ locale, namespace: "Metadata" }); + const t = await getTranslations({ locale, namespace: "Metadata" }); - return { - title: t("Home.title"), - description: t("Home.description"), - }; + return { + title: t("Home.title"), + description: t("Home.description"), + }; } export default async function LocaleLayout({ - children, - params: { locale }, + children, + params: { locale }, }: Readonly) { - return ( - - - - - + return ( + + + + + {children} - + - - - - - ); + + + + + ); } diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index c088243..30b4969 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -1,23 +1,23 @@ import { - About, - BackToTop, - Contact, - Footer, - Header, - Projects, - Start, + About, + BackToTop, + Contact, + Footer, + Header, + Projects, + Start, } from "@/components"; export default function Home() { - return ( -
-
- - - - - -
-
- ); + return ( +
+ + + + + + +
+
+ ); } diff --git a/src/components/about/about-root.tsx b/src/components/about/about-root.tsx new file mode 100644 index 0000000..a51d972 --- /dev/null +++ b/src/components/about/about-root.tsx @@ -0,0 +1,30 @@ +"use client" + +import { useTranslations } from "next-intl"; +import { About, Icon } from "@/components"; + +export function AboutRoot() { + const t = useTranslations("About"); + + return ( +
+
{t("Title")}
+
+ Miguel Alexandre Uhlein PPF +
+ +
+
+
+ + + + +
+
+ ); +} diff --git a/src/components/about/about.tsx b/src/components/about/about.tsx deleted file mode 100644 index 4f1f5e8..0000000 --- a/src/components/about/about.tsx +++ /dev/null @@ -1,30 +0,0 @@ -"use client" - -import { useTranslations } from "next-intl"; -import { AboutText, Icon } from "@/components"; - -export function About() { - const t = useTranslations("About"); - - return ( -
-
{t("Title")}
-
- Miguel Alexandre Uhlein PPF -
- -
-
-
- - - - -
-
- ); -} diff --git a/src/components/about/index.ts b/src/components/about/index.ts new file mode 100644 index 0000000..face414 --- /dev/null +++ b/src/components/about/index.ts @@ -0,0 +1,7 @@ +import { AboutRoot } from "./about-root"; +import { AboutText } from "./about-text"; + +export const About = { + Root: AboutRoot, + Text: AboutText, +} \ No newline at end of file diff --git a/src/components/header/header-root.tsx b/src/components/header/header-root.tsx new file mode 100644 index 0000000..36e45ae --- /dev/null +++ b/src/components/header/header-root.tsx @@ -0,0 +1,23 @@ +import { ChangeLanguage, Header, Theme } from "@/components"; + +export function HeaderRoot() { + return ( + + ); +} diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx deleted file mode 100644 index be6ec11..0000000 --- a/src/components/header/header.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { ChangeLanguage, HeaderAnchor, ToggleTheme } from "@/components"; - -export function Header() { - return ( - - ); -} diff --git a/src/components/header/index.ts b/src/components/header/index.ts new file mode 100644 index 0000000..e166e1f --- /dev/null +++ b/src/components/header/index.ts @@ -0,0 +1,7 @@ +import { HeaderAnchor } from "./header-anchor"; +import { HeaderRoot } from "./header-root"; + +export const Header = { + Root: HeaderRoot, + Anchor: HeaderAnchor, +} \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 2667a53..89eae4e 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,14 +1,11 @@ -export * from "./about/about"; -export * from "./about/about-text" +export * from "./about"; export * from "./back-to-top"; export * from "./change-language"; export * from "./contact" export * from "./footer" -export * from "./header/header" -export * from "./header/header-anchor" +export * from "./header" export * from "./icon"; export * from "./main-container" export * from "./projects" export * from "./start" -export * from "./theme/theme-provider" -export * from "./theme/toggle-theme" +export * from "./theme" diff --git a/src/components/theme/index.ts b/src/components/theme/index.ts new file mode 100644 index 0000000..95262f5 --- /dev/null +++ b/src/components/theme/index.ts @@ -0,0 +1,7 @@ +import { ThemeProvider } from "./theme-provider"; +import { ToggleTheme } from "./toggle-theme"; + +export const Theme = { + Provider: ThemeProvider, + Toggle: ToggleTheme +} \ No newline at end of file