Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgill committed Apr 1, 2024
1 parent ccd82b1 commit 9421c56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 60 deletions.
6 changes: 3 additions & 3 deletions apps/docs/src/components/theme-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export function ThemeToggle() {
});

const toggleTheme = () => {
const t = theme === "light" ? "dark" : "light";
localStorage.setItem("theme", t);
setTheme(t);
const newTheme = theme === "light" ? "dark" : "light";
localStorage.setItem("theme", newTheme);
setTheme(newTheme);
};

const mounted = useMounted();
Expand Down
56 changes: 0 additions & 56 deletions apps/docs/src/layouts/auth-layout.astro

This file was deleted.

4 changes: 3 additions & 1 deletion apps/docs/src/layouts/main-layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const { title, description, mainClass } = Astro.props;
>
<Icon name="github" class="size-[22px]" />
</a>
<ThemeToggle client:load />
<div class="min-w-[22px]">
<ThemeToggle client:load />
</div>
</div>
</Header>

Expand Down

0 comments on commit 9421c56

Please sign in to comment.