Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
🐛 dark / light theme rendering. added pwa files to gitignore
Browse files Browse the repository at this point in the history
dark / light theme rendering. added pwa files to gitignore

🐛 Bugfix
  • Loading branch information
TimMikeladze committed Dec 29, 2022
1 parent 1d1a9e4 commit 5acdf36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
public/sw.js
public/workbox*.js
4 changes: 3 additions & 1 deletion src/components/ThemeModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ const ThemeModeToggle = (props: IconButtonProps) => {

if (!mounted) {
// to avoid layout shift, render a placeholder button
return <Button variant="plain" />;
return (
<Button variant="plain" sx={(theme) => ({ width: theme.spacing(60) })} />
);
}

return (
Expand Down
2 changes: 2 additions & 0 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getInitColorSchemeScript } from '@mui/joy/styles';
import Document, { Html, Head, Main, NextScript } from 'next/document';

export default class MyDocument extends Document {
Expand All @@ -12,6 +13,7 @@ export default class MyDocument extends Document {
/>
</Head>
<body>
{getInitColorSchemeScript()}
<Main />
<NextScript />
</body>
Expand Down

1 comment on commit 5acdf36

@vercel
Copy link

@vercel vercel bot commented on 5acdf36 Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.