From 5c9f67c7e9f4847d6837b25608907bee8d3207c7 Mon Sep 17 00:00:00 2001 From: codytseng Date: Sat, 15 Mar 2025 11:37:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Titlebar/index.tsx | 2 +- src/pages/primary/NoteListPage/FeedButton.tsx | 13 +++++++------ src/pages/primary/NoteListPage/index.tsx | 4 ++-- src/pages/secondary/ProfilePage/index.tsx | 10 +++++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/components/Titlebar/index.tsx b/src/components/Titlebar/index.tsx index 0636896c..60b4dfbf 100644 --- a/src/components/Titlebar/index.tsx +++ b/src/components/Titlebar/index.tsx @@ -10,7 +10,7 @@ export function Titlebar({ return (
diff --git a/src/pages/primary/NoteListPage/FeedButton.tsx b/src/pages/primary/NoteListPage/FeedButton.tsx index 6ae32a4e..962f9e95 100644 --- a/src/pages/primary/NoteListPage/FeedButton.tsx +++ b/src/pages/primary/NoteListPage/FeedButton.tsx @@ -2,6 +2,7 @@ import FeedSwitcher from '@/components/FeedSwitcher' import { Drawer, DrawerContent } from '@/components/ui/drawer' import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' import { simplifyUrl } from '@/lib/url' +import { cn } from '@/lib/utils' import { useFeed } from '@/providers/FeedProvider' import { useRelaySets } from '@/providers/RelaySetsProvider' import { useScreenSize } from '@/providers/ScreenSizeProvider' @@ -9,14 +10,14 @@ import { ChevronDown, Server, UsersRound } from 'lucide-react' import { forwardRef, HTMLAttributes, useState } from 'react' import { useTranslation } from 'react-i18next' -export default function FeedButton() { +export default function FeedButton({ className }: { className?: string }) { const { isSmallScreen } = useScreenSize() const [open, setOpen] = useState(false) if (isSmallScreen) { return ( <> - setOpen(true)} /> + setOpen(true)} />
@@ -31,7 +32,7 @@ export default function FeedButton() { return ( - + setOpen(false)} /> @@ -41,7 +42,7 @@ export default function FeedButton() { } const FeedSwitcherTrigger = forwardRef>( - (props, ref) => { + ({ className, ...props }, ref) => { const { t } = useTranslation() const { feedType, relayUrls, activeRelaySetId } = useFeed() const { relaySets } = useRelaySets() @@ -61,12 +62,12 @@ const FeedSwitcherTrigger = forwardRef {feedType === 'following' ? : } -
{title}
+
{title}
) diff --git a/src/pages/primary/NoteListPage/index.tsx b/src/pages/primary/NoteListPage/index.tsx index 81e121ce..9b098809 100644 --- a/src/pages/primary/NoteListPage/index.tsx +++ b/src/pages/primary/NoteListPage/index.tsx @@ -66,8 +66,8 @@ function NoteListPageTitlebar({ temporaryRelayUrls = [] }: { temporaryRelayUrls? return (
- -
+ +
{temporaryRelayUrls.length > 0 && ( )} diff --git a/src/pages/secondary/ProfilePage/index.tsx b/src/pages/secondary/ProfilePage/index.tsx index 22713c57..e0fab0a2 100644 --- a/src/pages/secondary/ProfilePage/index.tsx +++ b/src/pages/secondary/ProfilePage/index.tsx @@ -129,9 +129,13 @@ const ProfilePage = forwardRef(({ id, index }: { id?: string; index?: number },
{website && ( -