diff --git a/src/components/FeedSwitcher/index.tsx b/src/components/FeedSwitcher/index.tsx index 3539e61f..dbd4842f 100644 --- a/src/components/FeedSwitcher/index.tsx +++ b/src/components/FeedSwitcher/index.tsx @@ -31,7 +31,7 @@ export default function FeedSwitcher({ close }: { close?: () => void }) {
{t('relay sets')}
close?.()} > diff --git a/src/lib/link.ts b/src/lib/link.ts index c3fcc80a..130710b7 100644 --- a/src/lib/link.ts +++ b/src/lib/link.ts @@ -33,7 +33,7 @@ export const toOthersRelaySettings = (pubkey: string) => { return `/users/${npub}/relays` } export const toRelaySettings = (tag?: 'mailbox' | 'relay-sets') => { - return '/relay-settings' + (tag === 'relay-sets' ? '#relay-sets' : '') + return '/relay-settings' + (tag ? '#' + tag : '') } export const toSettings = () => '/settings' export const toProfileEditor = () => '/profile-editor' diff --git a/src/pages/secondary/ProfilePage/index.tsx b/src/pages/secondary/ProfilePage/index.tsx index 4f09a934..a91f1915 100644 --- a/src/pages/secondary/ProfilePage/index.tsx +++ b/src/pages/secondary/ProfilePage/index.tsx @@ -125,7 +125,7 @@ export default function ProfilePage({ id, index }: { id?: string; index?: number
{t('Following')}
{relayCount} diff --git a/src/pages/secondary/RelaySettingsPage/index.tsx b/src/pages/secondary/RelaySettingsPage/index.tsx index b39be0c2..2f7a3413 100644 --- a/src/pages/secondary/RelaySettingsPage/index.tsx +++ b/src/pages/secondary/RelaySettingsPage/index.tsx @@ -7,32 +7,32 @@ import { useTranslation } from 'react-i18next' export default function RelaySettingsPage({ index }: { index?: number }) { const { t } = useTranslation() - const [tabValue, setTabValue] = useState('mailbox') + const [tabValue, setTabValue] = useState('relay-sets') useEffect(() => { - if (window.location.hash === '#relay-sets') { - setTabValue('relay-sets') + switch (window.location.hash) { + case '#mailbox': + setTabValue('mailbox') + break + case '#relay-sets': + setTabValue('relay-sets') + break } }, []) return ( - + - {t('Read & Write Relays')} {t('Relay Sets')} + {t('Read & Write Relays')} - - - + + + )