-
Notifications
You must be signed in to change notification settings - Fork 462
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
1 parent
0d57765
commit d41eff8
Showing
8 changed files
with
75 additions
and
22 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
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,23 @@ | ||
"use client"; | ||
|
||
import { cn } from "@/lib/cssUtils"; | ||
import { useAtomValue } from "jotai"; | ||
import { isNavStuckAtom, isSearchStuckAtom } from "../atoms"; | ||
|
||
export const HeaderBackground = () => { | ||
const isNavStuck = useAtomValue(isNavStuckAtom); | ||
const isSearchStuck = useAtomValue(isSearchStuckAtom); | ||
|
||
return ( | ||
<div | ||
className={cn( | ||
"fixed inset-x-0 top-0 z-10 h-0 bg-card shadow-md transition-all duration-200 dark:bg-background", | ||
{ | ||
"h-16": isNavStuck, | ||
"h-[calc(theme(space.36)+theme(space.2))] bg-gradient-to-b from-card to-background sm:h-[calc(theme(space.28)-theme(space.2))] dark:from-background dark:to-card-secondary/50": | ||
isSearchStuck, | ||
}, | ||
)} | ||
/> | ||
); | ||
}; |
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,3 +1,5 @@ | ||
import { atom } from "jotai"; | ||
|
||
export const searchAtom = atom<string | undefined>(undefined); | ||
export const isNavStuckAtom = atom(false); | ||
export const isSearchStuckAtom = atom(false); |
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 +1,5 @@ | ||
export const PAGE_SIZE = 24; | ||
export const ACTIVE_SECTION = { | ||
yourGuilds: "your-guilds", | ||
exploreGuilds: "explore-guilds", | ||
}; |
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