Skip to content

Commit

Permalink
refactor: use const and delete unnecessary val
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin committed Jul 30, 2024
1 parent 2a8040b commit b0d2ac4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/clientLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ export default function ClientLayout({
children: React.ReactNode;
}) {
useEffect(() => {
let theme = getTheme();
const body = document.body;
body.setAttribute("data-theme", theme);
const theme = getTheme();
document.body.setAttribute("data-theme", theme);
});
return (
<>
Expand Down

0 comments on commit b0d2ac4

Please sign in to comment.