Skip to content

Commit

Permalink
πŸ‘’πŸŒ– ↝ Hotfix for #91
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Jan 1, 2024
1 parent 7468f69 commit fdb813c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 167 deletions.
16 changes: 8 additions & 8 deletions components/Section/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,10 @@ const Layout: React.FC<DashboardLayoutProps> = ({ children }) => {

return (
<>
<div className="hidden md:flex relative items-start">
<DesktopSidebar />
<main className="h-max pb-10 grow ml-64 pt-6">
{/* <Navbar /> */}
<main className="h-max pb-10 grow 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>
Expand All @@ -45,7 +42,7 @@ const Layout: React.FC<DashboardLayoutProps> = ({ children }) => {

export default Layout;

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

useEffect(() => {
Expand All @@ -64,10 +61,13 @@ export const GardenLayout: React.FC<DashboardLayoutProps> = ({ children }) => {

return (
<>
<main className="grow pt-6">
{/* <DesktopSidebar /> */}
<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>
Expand Down
157 changes: 1 addition & 156 deletions components/Section/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default Sidebar;

export function DesktopSidebar () {
return (
<div className="min-h-screen flex flex-col flex-auto flex-shrink-0 antialiased text-gray-800">
<div className="min-h-screen flex flex-col flex-auto flex-shrink-0 antialiased bg-gray-50 text-gray-800">
<div className="fixed flex flex-col top-0 left-0 w-64 bg-white h-full border-r">
<div className="flex items-center justify-center h-14 border-b">
<div>Star Sailors Alpha 0.2.1</div>
Expand Down Expand Up @@ -265,161 +265,6 @@ export function DesktopSidebar () {
<span className="ml-2 text-sm tracking-wide truncate">Pick your planet</span>
</a>
</li>
<li>
<a href="https://vercel.com/gizmotronn/starprotocol/zyGjejQDyy6cwctvEgrdhAxCx7sF" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6"> {/* Add as iframe page later */}
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="gold" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Star Sailors Alpha 1.0</span>
</a>
</li>
</ul>
</div>
</div>
</div>
);
};

export function GardenSidebar () {
return (
<div className="min-h-screen flex flex-col flex-auto flex-shrink-0 antialiased text-gray-800">
<div className="fixed flex flex-col top-0 left-0 w-64 bg-white h-full border-r">
<div className="flex items-center justify-center h-14 border-b">
<div>Star Sailors Alpha 0.2.1</div>
</div>
<div className="overflow-y-auto overflow-x-hidden flex-grow">
<ul className="flex flex-col py-4 space-y-1">
<li className="px-5">
<div className="flex flex-row items-center h-8">
<div className="text-sm font-light tracking-wide text-gray-500">Dashboard</div>
</div>
</li>
<li>
<a href="/feed" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Feed</span>
</a>
</li>
<li>
<a href="/tests/placeholder" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Inbox</span>
<span className="px-2 py-0.5 ml-auto text-xs font-medium tracking-wide text-indigo-500 bg-indigo-50 rounded-full">New</span>
</a>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Messages</span>
</a>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Notifications</span>
<span className="px-2 py-0.5 ml-auto text-xs font-medium tracking-wide text-red-500 bg-red-50 rounded-full">1.2k</span>
</a>
</li>
<li className="px-5">
<div className="flex flex-row items-center h-8">
<div className="text-sm font-light tracking-wide text-gray-500">Your Garden</div>
</div>
</li>
<li>
<a href="/garden" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Garden</span>
</a>
</li>
<li>
<a href="/archive/planetGarden" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Archived Garden</span>
</a>
</li>
<li>
<a href="/garden" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Planets</span>
<span className="px-2 py-0.5 ml-auto text-xs font-medium tracking-wide text-green-500 bg-green-50 rounded-full">3</span>
</a>
</li>
<li>
<a href="/planets/1" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Water/Checkup</span>
<span className="px-2 py-0.5 ml-auto text-xs font-medium tracking-wide text-green-500 bg-green-50 rounded-full">5</span>
</a>
</li>
<li className="px-5">
<div className="flex flex-row items-center h-8">
<div className="text-sm font-light tracking-wide text-gray-500">Missions</div>
</div>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Profile</span>
</a>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Tasks</span>
</a>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Inventory</span>
</a>
</li>
<li>
<a href="#" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Gather</span>
</a>
</li>
<li>
<a href="/onboarding/select" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6">
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Pick your planet</span>
</a>
</li>
<li>
<a href="https://vercel.com/gizmotronn/starprotocol/zyGjejQDyy6cwctvEgrdhAxCx7sF" className="relative flex flex-row items-center h-11 focus:outline-none hover:bg-gray-50 text-gray-600 hover:text-gray-800 border-l-4 border-transparent hover:border-indigo-500 pr-6"> {/* Add as iframe page later */}
<span className="inline-flex justify-center items-center ml-4">
<svg className="w-5 h-5" fill="none" stroke="gold" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"></path></svg>
</span>
<span className="ml-2 text-sm tracking-wide truncate">Star Sailors Alpha 1.0</span>
</a>
</li>
</ul>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions pages/garden.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from "react";
// import Garden from "../components/Gameplay/Garden";
import { Garden } from "../components/Content/Planets/GalleryList";
import Layout, { GardenLayout, LayoutNoNav } from "../components/Section/Layout";
import Sidebar from "../components/Section/Sidebar";
import Layout, { LayoutNoNav } from "../components/Section/Layout";
import Navbar from "../components/Section/Navbar";

export default function GardenPage() {
return (
<Garden />
<LayoutNoNav>
<Navbar />
<Garden />
</LayoutNoNav>
)
}

0 comments on commit fdb813c

Please sign in to comment.