Skip to content

Commit ddd56b5

Browse files
committed
πŸͺ¨πŸ₯š ↝ Bug fixes & attempting to repair build error relations
1 parent 32f7626 commit ddd56b5

File tree

7 files changed

+8
-195
lines changed

7 files changed

+8
-195
lines changed

β€Žcomponents/Core/Layout.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Link from "next/link";
33
import { useRouter } from "next/router";
44
import { useSession, useSupabaseClient } from '@supabase/auth-helpers-react';
55
import Navbar from "./Navbar";
6-
import MusicPlayer from "./assets/MusicPlayer";
76
// import Footer from "./Footer";
87

98
interface DashboardLayoutProps {

β€Žcomponents/Section/Layout.tsx

+1-105
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import Sidebar, { DesktopSidebar } from "./Sidebar";
22
import Navbar from "./Navbar";
33
import React, { ReactNode, useEffect, useState } from "react";
4-
import Bottombar from "../Core/BottomBar";
5-
import { InventoryMenu } from "../Content/Inventory/ItemGroup";
64

75
interface DashboardLayoutProps {
86
children: ReactNode;
@@ -35,112 +33,10 @@ const Layout: React.FC<DashboardLayoutProps> = ({ children }) => {
3533
{isMobile && (
3634
<div className="md:hidden overflow-y-auto h-screen p-4">
3735
<main className="h-max pb-10 grow">{children}</main>
38-
<Bottombar />
3936
</div>
4037
)}
4138
</>
4239
);
4340
};
4441

45-
export default Layout;
46-
47-
export const InventoryLayout: React.FC<DashboardLayoutProps> = ({ children }) => {
48-
const [isMobile, setIsMobile] = useState(false);
49-
const [activeTab, setActiveTab] = useState('consumables')
50-
51-
useEffect(() => {
52-
if (typeof window !== 'undefined') {
53-
const checkIsMobile = () => {
54-
setIsMobile(window.innerWidth <= 768);
55-
};
56-
checkIsMobile();
57-
window.addEventListener("resize", checkIsMobile);
58-
return () => {
59-
window.removeEventListener('resize', checkIsMobile);
60-
};
61-
};
62-
}, []);
63-
64-
return (
65-
<>
66-
<main className="h-max pb-10 grow pt-6">
67-
<Navbar />
68-
<div className="py-5"><center><div className="py-12"><InventoryMenu setActiveTab={setActiveTab} /></div></center></div>
69-
<div className="py-12">
70-
{children}
71-
</div>
72-
</main>
73-
{isMobile && (
74-
<div className="md:hidden overflow-y-auto h-screen p-4">
75-
<main className="h-max pb-10 grow">{children}</main>
76-
<Bottombar />
77-
</div>
78-
)}
79-
</>
80-
);
81-
};
82-
83-
export const LayoutWithSidebar: React.FC<DashboardLayoutProps> = ({ children }) => {
84-
const [isMobile, setIsMobile] = useState(false);
85-
86-
useEffect(() => {
87-
if (typeof window !== "undefined") {
88-
const checkIsMobile = () => {
89-
setIsMobile(window.innerWidth <= 768);
90-
};
91-
checkIsMobile();
92-
window.addEventListener("resize", checkIsMobile);
93-
return () => {
94-
window.removeEventListener("resize", checkIsMobile);
95-
};
96-
}
97-
}, []);
98-
99-
return (
100-
<>
101-
<div className="hidden md:flex relative items-start">
102-
<DesktopSidebar />
103-
<main className="h-max pb-10 grow ml-64 pt-6">
104-
{/* <Navbar /> */}
105-
{children}
106-
</main>
107-
</div>
108-
{isMobile && (
109-
<div className="md:hidden overflow-y-auto h-screen p-4">
110-
<main className="h-max pb-10 grow">{children}</main>
111-
<Bottombar />
112-
</div>
113-
)}
114-
</>
115-
);
116-
};
117-
118-
export const LayoutNoNav: React.FC<DashboardLayoutProps> = ({ children }) => {
119-
const [isMobile, setIsMobile] = useState(false);
120-
121-
useEffect(() => {
122-
if (typeof window !== "undefined") {
123-
const checkIsMobile = () => {
124-
setIsMobile(window.innerWidth <= 768);
125-
};
126-
checkIsMobile();
127-
window.addEventListener("resize", checkIsMobile);
128-
return () => {
129-
window.removeEventListener("resize", checkIsMobile);
130-
};
131-
}
132-
}, []);
133-
134-
return (
135-
<div className="flex relative items-start h-screen overflow-hidden">
136-
<main className="h-max pb-10 grow overflow-y-auto">
137-
{children}
138-
</main>
139-
{isMobile && (
140-
<div className="w-full md:hidden fixed bottom-0 left-0 z-50">
141-
<Bottombar />
142-
</div>
143-
)}
144-
</div>
145-
);
146-
};
42+
export default Layout;

β€Žpages/_app.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import React, { useState } from 'react';
33
import { AppProps } from 'next/app';
44
import Head from 'next/head';
5+
import { ThirdwebProvider } from "@thirdweb-dev/react";
56

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

1820
return (
1921
<>
2022
<Head>
2123
</Head>
24+
<ThirdwebProvider
25+
clientId={process.env.NEXT_PUBLIC_TEMPLATE_CLIENT_ID}
26+
activeChain={activeChain}
27+
>
2228
<SessionContextProvider
2329
supabaseClient={supabaseClient}
2430
initialSession={pageProps.initialSession}
2531
>
2632
<Component {...pageProps} />
2733
</SessionContextProvider>
34+
</ThirdwebProvider>
2835
</>
2936
);
3037
}

β€Žpages/explore.tsx

-19
This file was deleted.

β€Žpages/feed/fullFeed.tsx

-8
This file was deleted.

β€Žpages/feed/index.tsx

-48
This file was deleted.

β€Žpages/garden.tsx

-14
This file was deleted.

0 commit comments

Comments
Β (0)