-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
68 additions
and
67 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
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
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
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,23 +1,23 @@ | ||
import Tooltip from "@/components/common/Tooltip"; | ||
import {useEventGroup} from "@/lib/event-group"; | ||
import { useEventGroup } from "@/lib/event-group"; | ||
|
||
export default function HideButton({ groupId }: { groupId: number }) { | ||
const { isHidden, switchHideFavorite } = useEventGroup(groupId); | ||
return <Tooltip | ||
content={isHidden ? "Hidden from calendar" : "Hide from calendar"} | ||
> | ||
<button | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
switchHideFavorite && switchHideFavorite(); | ||
}} | ||
className="w-52 h-52 p-2 rounded-2xl text-4xl hover:bg-secondary-hover" | ||
> | ||
{isHidden ? ( | ||
<span className="icon-[material-symbols--visibility-off-outline] text-icon-main/50" /> | ||
) : ( | ||
<span className="icon-[material-symbols--visibility-outline] text-icon-main/50" /> | ||
)} | ||
</button> | ||
const { isHidden, switchHideFavorite } = useEventGroup(groupId); | ||
return ( | ||
<Tooltip content={isHidden ? "Hidden from calendar" : "Hide from calendar"}> | ||
<button | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
switchHideFavorite && switchHideFavorite(); | ||
}} | ||
className="h-52 w-52 rounded-2xl p-2 text-4xl hover:bg-secondary-hover" | ||
> | ||
{isHidden ? ( | ||
<span className="icon-[material-symbols--visibility-off-outline] text-icon-main/50" /> | ||
) : ( | ||
<span className="icon-[material-symbols--visibility-outline] text-icon-main/50" /> | ||
)} | ||
</button> | ||
</Tooltip> | ||
} | ||
); | ||
} |
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