Skip to content

Commit

Permalink
Merge pull request #128 from diwash007/hide_navbar
Browse files Browse the repository at this point in the history
Hide navbar while solving
  • Loading branch information
bryanlundberg authored Oct 25, 2023
2 parents eaa8519 + 42e3e81 commit 629e8fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/PreloadSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { usePreloadSettings } from "@/hooks/usePreloadSettings";
import { Navbar } from "./navbar";
import { useSettingsModalStore } from "@/store/SettingsModalStore";
import { useTimerStore } from "@/store/timerStore";

export default function PreloadSettings({
children,
Expand All @@ -11,15 +12,13 @@ export default function PreloadSettings({
}) {
usePreloadSettings();
const { settings } = useSettingsModalStore();
const { isSolving } = useTimerStore();
const theme = settings ? settings.theme.background.color : "light";
return (
<>
<div className={`${theme}`}>
<div className="flex flex-col justify-between max-h-screen min-h-screen gap-2 select-none light:bg-neutral-50 light:text-zinc-950 dark:bg-zinc-950 dark:text-slate-50">
{children}{" "}
<>
<Navbar />
</>
{children} <>{!isSolving && <Navbar />}</>
</div>
</div>
</>
Expand Down

0 comments on commit 629e8fc

Please sign in to comment.