-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2059 from makeplane/develop
Promote: Develop to Stage Release
- Loading branch information
Showing
14 changed files
with
190 additions
and
674 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
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 |
---|---|---|
@@ -1,25 +1,32 @@ | ||
"use client"; | ||
|
||
// next theme | ||
import { useTheme } from "next-themes"; | ||
|
||
// mobx react lite | ||
import { observer } from "mobx-react-lite"; | ||
import { useEffect, useState } from "react"; | ||
|
||
export const NavbarTheme = observer(() => { | ||
const [appTheme, setAppTheme] = useState("light"); | ||
|
||
const { setTheme, theme } = useTheme(); | ||
|
||
const handleTheme = () => { | ||
setTheme(theme === "light" ? "dark" : "light"); | ||
}; | ||
|
||
useEffect(() => { | ||
if (!theme) return; | ||
|
||
setAppTheme(theme); | ||
}, [theme]); | ||
|
||
return ( | ||
<button | ||
type="button" | ||
onClick={handleTheme} | ||
className="relative w-7 h-7 grid place-items-center bg-custom-background-100 hover:bg-custom-background-80 text-custom-text-100 rounded" | ||
> | ||
<span className="material-symbols-rounded text-sm">{theme === "light" ? "dark_mode" : "light_mode"}</span> | ||
<span className="material-symbols-rounded text-sm">{appTheme === "light" ? "dark_mode" : "light_mode"}</span> | ||
</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
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
Oops, something went wrong.
c110218
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
plane-staging – ./apps/app
plane-staging-git-stage-release-plane.vercel.app
takeoff.plane.so
plane-app-eight.vercel.app
plane-staging-plane.vercel.app
c110218
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
plane-sh-stage – ./apps/space
plane-sh-stage-plane.vercel.app
plane-sh-stage-git-stage-release-plane.vercel.app
plane-space-stage.vercel.app