Skip to content

Commit

Permalink
add powered by stackr footer
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaan7 committed Aug 8, 2024
1 parent d4c2b8e commit 29ee721
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions game/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Providers from "@/components/auth-provider";
import { Navbar } from "@/components/navbar";
import { Footer } from "@/components/footer";
import { ThemeProvider } from "@/components/theme-provider";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
Expand Down Expand Up @@ -37,6 +38,7 @@ export default function RootLayout({
<div className="flex flex-col p-8 h-[100vh] w-[100vw]">
<Navbar />
{children}
<Footer />
</div>
</Providers>
</ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion game/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Home() {
const disableLogin = !ready || (ready && authenticated);

return (
<main className="flex flex-1 min-h-screen flex-col gap-8 py-6 w-full m-auto">
<main className="flex flex-1 flex-col gap-8 py-6 w-full m-auto">
<div className="flex gap-6 items-center">
{authenticated ? (
<CreateGame />
Expand Down
20 changes: 20 additions & 0 deletions game/src/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"use client";

import { useTheme } from "next-themes";
import Image from "next/image";

export const Footer = () => {
const { resolvedTheme } = useTheme();
const image = resolvedTheme === "dark" ? "light" : "dark";
return (
<footer className="flex items-center justify-center">
Powered By
<Image
src={`https://assets.stackrlabs.xyz/${image}.svg`}
width={100}
height={100}
alt="stackr-logo"
/>
</footer>
);
};

0 comments on commit 29ee721

Please sign in to comment.