From 2ced57c4f692d809ff2bac2251f941432f21e3eb Mon Sep 17 00:00:00 2001 From: Connor Campbell Date: Fri, 19 Jan 2024 10:35:01 +0000 Subject: [PATCH 1/3] fix: disable ssr for labels to avoid hydration error --- components/table/table.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/table/table.tsx b/components/table/table.tsx index f503e87..325d31d 100644 --- a/components/table/table.tsx +++ b/components/table/table.tsx @@ -11,9 +11,14 @@ import { } from "@nextui-org/table"; import { Spinner } from "@nextui-org/spinner"; import { Contribution, PaginatedContributions } from "@/types/contribution"; -import { ExternalLink, Content, Labels, Time, Project } from "./row"; +import { ExternalLink, Content, Time, Project } from "./row"; + import { useContributions } from "@/hooks/useContributions"; import { KudosQueryParameters } from "@/lib/notion/types"; +import dynamic from "next/dynamic"; +const Labels = dynamic(() => import("./row").then((m) => m.Labels), { + ssr: false, +}); interface IColumn { name: string; From 34f250c69803545d0a590dcfa7e0d08999a706f0 Mon Sep 17 00:00:00 2001 From: Connor Campbell Date: Fri, 19 Jan 2024 12:22:59 +0000 Subject: [PATCH 2/3] add feedback dropdown and form links --- assets/icons.tsx | 39 +++++++++++++++++++++++++++++++++- components/navbar.tsx | 49 ++++++++++++++++++++++++++++++++++++++++++- data/config.ts | 2 ++ 3 files changed, 88 insertions(+), 2 deletions(-) diff --git a/assets/icons.tsx b/assets/icons.tsx index c997f9b..454a80b 100644 --- a/assets/icons.tsx +++ b/assets/icons.tsx @@ -166,4 +166,41 @@ export const BugIcon: React.FC = ({ ); }; -export default BugIcon; +export const FeedbackIcon: React.FC = ({ + size = 24, + width, + height, + ...props +}) => { + return ( + + + + + + + + ); +}; diff --git a/components/navbar.tsx b/components/navbar.tsx index f863030..bed7273 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -1,3 +1,4 @@ +"use client"; import NextLink from "next/link"; import { Button } from "@nextui-org/button"; import { Tooltip } from "@nextui-org/tooltip"; @@ -9,10 +10,18 @@ import { } from "@nextui-org/navbar"; import { Chip } from "@nextui-org/chip"; import { Link } from "@nextui-org/link"; -import BugIcon from "@/assets/icons"; +import { BugIcon, FeedbackIcon } from "@/assets/icons"; import { MyImage } from "@/components/ui/image"; import { SITE_CONFIG } from "@/data/config"; +import { + Dropdown, + DropdownTrigger, + DropdownMenu, + DropdownSection, + DropdownItem, +} from "@nextui-org/dropdown"; + export const Navbar = () => { return ( @@ -55,6 +64,44 @@ export const Navbar = () => { + + + + {/* add wrapper div workaround for tool tip */} +
+ + + +
+
+ + + Contributor + + + + Project maintainer + + +
+
Date: Fri, 19 Jan 2024 17:58:37 +0100 Subject: [PATCH 3/3] fix: Fix DOM arguments --- assets/icons.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/icons.tsx b/assets/icons.tsx index 454a80b..feaf06a 100644 --- a/assets/icons.tsx +++ b/assets/icons.tsx @@ -53,7 +53,7 @@ export const ChevronOpenIcon = (props: IconSvgProps) => ( > = ({ fill="currentColor" />