-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add category nav component #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import "./.next/types/routes.d.ts"; | ||
| import "./.next/dev/types/routes.d.ts"; | ||
|
|
||
| // NOTE: This file should not be edited | ||
| // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,36 +12,36 @@ import { | |
| ReactionsList, | ||
| } from "./reactions.client"; | ||
|
|
||
| const liveblocks = new LiveblocksClient({ | ||
| secret: process.env.LIVEBLOCKS_SECRET_KEY!, | ||
| }); | ||
| // const liveblocks = new LiveblocksClient({ | ||
| // secret: process.env.LIVEBLOCKS_SECRET_KEY!, | ||
| // }); | ||
|
|
||
| async function ServerReactions() { | ||
| "use cache"; | ||
| // async function ServerReactions() { | ||
| // "use cache"; | ||
|
|
||
| cacheLife("seconds"); | ||
| // cacheLife("seconds"); | ||
|
|
||
| let reactions: ReactionsJson; | ||
| // let reactions: ReactionsJson; | ||
|
|
||
| try { | ||
| reactions = (await liveblocks.getStorageDocument(ROOM_ID, "json")) | ||
| .reactions; | ||
| } catch { | ||
| reactions = DEFAULT_REACTIONS; | ||
| } | ||
| // try { | ||
| // reactions = (await liveblocks.getStorageDocument(ROOM_ID, "json")) | ||
| // .reactions; | ||
| // } catch { | ||
| // reactions = DEFAULT_REACTIONS; | ||
| // } | ||
|
|
||
| if (!reactions || Object.keys(reactions).length === 0) { | ||
| reactions = DEFAULT_REACTIONS; | ||
| } | ||
| // if (!reactions || Object.keys(reactions).length === 0) { | ||
| // reactions = DEFAULT_REACTIONS; | ||
| // } | ||
|
|
||
| return <ClientReactions roomId={ROOM_ID} serverReactions={reactions} />; | ||
| } | ||
| // return <ClientReactions roomId={ROOM_ID} serverReactions={reactions} />; | ||
| // } | ||
|
|
||
| export function Reactions(props: Omit<ComponentProps<"div">, "children">) { | ||
| return ( | ||
| <ReactionsList {...props}> | ||
| <Suspense fallback={<FallbackReactions />}> | ||
| <ServerReactions /> | ||
| {/* <ServerReactions /> */} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Commented-out code accidentally committed for testingThe |
||
| </Suspense> | ||
| </ReactionsList> | ||
| ); | ||
|
|
||
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.