Skip to content

Commit

Permalink
🪨🥚 ↝ Bug fixes & attempting to repair build error relations
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Feb 8, 2024
1 parent 32f7626 commit ddd56b5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 195 deletions.
1 change: 0 additions & 1 deletion components/Core/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Link from "next/link";
import { useRouter } from "next/router";
import { useSession, useSupabaseClient } from '@supabase/auth-helpers-react';
import Navbar from "./Navbar";
import MusicPlayer from "./assets/MusicPlayer";
// import Footer from "./Footer";

interface DashboardLayoutProps {
Expand Down
106 changes: 1 addition & 105 deletions components/Section/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import Sidebar, { DesktopSidebar } from "./Sidebar";
import Navbar from "./Navbar";
import React, { ReactNode, useEffect, useState } from "react";
import Bottombar from "../Core/BottomBar";
import { InventoryMenu } from "../Content/Inventory/ItemGroup";

interface DashboardLayoutProps {
children: ReactNode;
Expand Down Expand Up @@ -35,112 +33,10 @@ const Layout: React.FC<DashboardLayoutProps> = ({ children }) => {
{isMobile && (
<div className="md:hidden overflow-y-auto h-screen p-4">
<main className="h-max pb-10 grow">{children}</main>
<Bottombar />
</div>
)}
</>
);
};

export default Layout;

export const InventoryLayout: React.FC<DashboardLayoutProps> = ({ children }) => {
const [isMobile, setIsMobile] = useState(false);
const [activeTab, setActiveTab] = useState('consumables')

useEffect(() => {
if (typeof window !== 'undefined') {
const checkIsMobile = () => {
setIsMobile(window.innerWidth <= 768);
};
checkIsMobile();
window.addEventListener("resize", checkIsMobile);
return () => {
window.removeEventListener('resize', checkIsMobile);
};
};
}, []);

return (
<>
<main className="h-max pb-10 grow pt-6">
<Navbar />
<div className="py-5"><center><div className="py-12"><InventoryMenu setActiveTab={setActiveTab} /></div></center></div>
<div className="py-12">
{children}
</div>
</main>
{isMobile && (
<div className="md:hidden overflow-y-auto h-screen p-4">
<main className="h-max pb-10 grow">{children}</main>
<Bottombar />
</div>
)}
</>
);
};

export const LayoutWithSidebar: React.FC<DashboardLayoutProps> = ({ children }) => {
const [isMobile, setIsMobile] = useState(false);

useEffect(() => {
if (typeof window !== "undefined") {
const checkIsMobile = () => {
setIsMobile(window.innerWidth <= 768);
};
checkIsMobile();
window.addEventListener("resize", checkIsMobile);
return () => {
window.removeEventListener("resize", checkIsMobile);
};
}
}, []);

return (
<>
<div className="hidden md:flex relative items-start">
<DesktopSidebar />
<main className="h-max pb-10 grow ml-64 pt-6">
{/* <Navbar /> */}
{children}
</main>
</div>
{isMobile && (
<div className="md:hidden overflow-y-auto h-screen p-4">
<main className="h-max pb-10 grow">{children}</main>
<Bottombar />
</div>
)}
</>
);
};

export const LayoutNoNav: React.FC<DashboardLayoutProps> = ({ children }) => {
const [isMobile, setIsMobile] = useState(false);

useEffect(() => {
if (typeof window !== "undefined") {
const checkIsMobile = () => {
setIsMobile(window.innerWidth <= 768);
};
checkIsMobile();
window.addEventListener("resize", checkIsMobile);
return () => {
window.removeEventListener("resize", checkIsMobile);
};
}
}, []);

return (
<div className="flex relative items-start h-screen overflow-hidden">
<main className="h-max pb-10 grow overflow-y-auto">
{children}
</main>
{isMobile && (
<div className="w-full md:hidden fixed bottom-0 left-0 z-50">
<Bottombar />
</div>
)}
</div>
);
};
export default Layout;
7 changes: 7 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import React, { useState } from 'react';
import { AppProps } from 'next/app';
import Head from 'next/head';
import { ThirdwebProvider } from "@thirdweb-dev/react";

// Styling imports
import '../styles/globals.css';
Expand All @@ -14,17 +15,23 @@ import { useRouter } from 'next/router';
function MyApp({ Component, pageProps }) {
const router = useRouter();
const [supabaseClient] = useState(() => createBrowserSupabaseClient());
const activeChain = "ethereum";

return (
<>
<Head>
</Head>
<ThirdwebProvider
clientId={process.env.NEXT_PUBLIC_TEMPLATE_CLIENT_ID}
activeChain={activeChain}
>
<SessionContextProvider
supabaseClient={supabaseClient}
initialSession={pageProps.initialSession}
>
<Component {...pageProps} />
</SessionContextProvider>
</ThirdwebProvider>
</>
);
}
Expand Down
19 changes: 0 additions & 19 deletions pages/explore.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions pages/feed/fullFeed.tsx

This file was deleted.

48 changes: 0 additions & 48 deletions pages/feed/index.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions pages/garden.tsx

This file was deleted.

0 comments on commit ddd56b5

Please sign in to comment.