Skip to content

Commit

Permalink
Merge pull request #997 from SimplementeCao/fix-972
Browse files Browse the repository at this point in the history
Fix: Remove footer from the home page
  • Loading branch information
Marchand-Nicolas authored Dec 20, 2024
2 parents c23f311 + 5b56f19 commit b12eaf8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 45 deletions.
53 changes: 8 additions & 45 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,29 @@
import React from "next";
import type { Metadata, Viewport } from "next";
"use client";

import React from "react";
import { usePathname } from "next/navigation";
import { Providers } from "./provider";
import "@styles/globals.css";
import Navbar from "@components/UI/navbar";
import Footer from "@components/UI/footer";
import { ThemeProvider } from "@mui/material";
import { theme } from "@components/UI/theme";

export const metadata: Metadata = {
title: "Starknet Quest",
description:
"Starknet Quest helps protocols attract and retain users by creating gamified quest experiences on Starknet.",
metadataBase: process.env.NEXT_PUBLIC_APP_LINK ? new URL(process.env.NEXT_PUBLIC_APP_LINK) : undefined,
openGraph: {
title: "Starknet Quest - Accomplish quests to get unique NFTs.",
description:
"Starknet Quest help protocols attract and retain users by creating gamified quest experiences on Starknet.",
url: process.env.NEXT_PUBLIC_APP_LINK,
siteName: "Starknet Quest",
images: [
{
url: "/visuals/starknetquest.webp",
width: 680,
height: 680,
},
],
locale: "en_US",
type: "website",
},
icons: {
icon: "/visuals/starknetquestLogo.svg",
},
twitter: {
card: "summary_large_image",
title: "Starknet Quest - Accomplish quests to get unique NFTs.",
description:
"Starknet Quest help protocols attract and retain users by creating gamified quest experiences on Starknet.",
images: ["/visuals/starknetquest.webp"],
},
};

export const viewport: Viewport = {
themeColor: "#6affaf",
};

export default function RootLayout({
// Layouts must accept a children prop.
// This will be populated with nested layouts or pages
children,
}: {
children: React.ReactNode;
}) {
const pathname = usePathname();

return (
<html lang="en">
<body className="default_background_color">
<Providers>
<ThemeProvider theme={theme}>
<Navbar />
<main className="mt-[48px]">
{children}
</main>
<Footer />
<main className="mt-[48px]">{children}</main>
{pathname !== "/" && <Footer />}
</ThemeProvider>
</Providers>
</body>
Expand Down
40 changes: 40 additions & 0 deletions app/metadata.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import type { Metadata, Viewport } from "next";

export const metadata: Metadata = {
title: "Starknet Quest",
description:
"Starknet Quest helps protocols attract and retain users by creating gamified quest experiences on Starknet.",
metadataBase: process.env.NEXT_PUBLIC_APP_LINK
? new URL(process.env.NEXT_PUBLIC_APP_LINK)
: undefined,
openGraph: {
title: "Starknet Quest - Accomplish quests to get unique NFTs.",
description:
"Starknet Quest helps protocols attract and retain users by creating gamified quest experiences on Starknet.",
url: process.env.NEXT_PUBLIC_APP_LINK,
siteName: "Starknet Quest",
images: [
{
url: "/visuals/starknetquest.webp",
width: 680,
height: 680,
},
],
locale: "en_US",
type: "website",
},
icons: {
icon: "/visuals/starknetquestLogo.svg",
},
twitter: {
card: "summary_large_image",
title: "Starknet Quest - Accomplish quests to get unique NFTs.",
description:
"Starknet Quest helps protocols attract and retain users by creating gamified quest experiences on Starknet.",
images: ["/visuals/starknetquest.webp"],
},
};

export const viewport: Viewport = {
themeColor: "#6affaf",
};

0 comments on commit b12eaf8

Please sign in to comment.