forked from QuivrHQ/quivr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: enhance user page UI (QuivrHQ#1319)"
This reverts commit 253e866.
- Loading branch information
1 parent
318cc28
commit 8a59b28
Showing
37 changed files
with
288 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-disable */ | ||
"use client"; | ||
import { useEffect, useLayoutEffect, useState } from "react"; | ||
import { MdDarkMode, MdLightMode } from "react-icons/md"; | ||
|
||
import Button from "@/lib/components/ui/Button"; | ||
|
||
export const DarkModeToggle = (): JSX.Element => { | ||
const [dark, setDark] = useState(false); | ||
|
||
useLayoutEffect(() => { | ||
const isDark = localStorage.getItem("dark"); | ||
if (isDark && isDark === "true") { | ||
document.body.parentElement?.classList.add("dark"); | ||
setDark(true); | ||
} | ||
}, []); | ||
|
||
useEffect(() => { | ||
if (dark) { | ||
document.body.parentElement?.classList.add("dark"); | ||
localStorage.setItem("dark", "true"); | ||
} else { | ||
document.body.parentElement?.classList.remove("dark"); | ||
localStorage.setItem("dark", "false"); | ||
} | ||
}, [dark]); | ||
|
||
return ( | ||
<Button | ||
aria-label="toggle dark mode" | ||
className="focus:outline-none text-3xl" | ||
onClick={() => setDark((d) => !d)} | ||
variant={"tertiary"} | ||
> | ||
{dark ? <MdLightMode /> : <MdDarkMode />} | ||
</Button> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
frontend/app/user/components/LanguageDropDown/LanguageSelect.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.