refactor: move bookmarks entry location
This commit is contained in:
parent
a847c4dc56
commit
5c2a016d4b
13 changed files with 95 additions and 69 deletions
|
|
@ -6,7 +6,7 @@ import { cn } from '@/lib/utils'
|
|||
import { useFavoriteRelays } from '@/providers/FavoriteRelaysProvider'
|
||||
import { useFeed } from '@/providers/FeedProvider'
|
||||
import { useScreenSize } from '@/providers/ScreenSizeProvider'
|
||||
import { BookmarkIcon, ChevronDown, Server, UsersRound } from 'lucide-react'
|
||||
import { ChevronDown, Server, UsersRound } from 'lucide-react'
|
||||
import { forwardRef, HTMLAttributes, useMemo, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
|
|
@ -62,9 +62,6 @@ const FeedSwitcherTrigger = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivEle
|
|||
if (feedInfo.feedType === 'following') {
|
||||
return t('Following')
|
||||
}
|
||||
if (feedInfo.feedType === 'bookmarks') {
|
||||
return t('Bookmarks')
|
||||
}
|
||||
if (relayUrls.length === 0) {
|
||||
return t('Choose a relay')
|
||||
}
|
||||
|
|
@ -82,13 +79,7 @@ const FeedSwitcherTrigger = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivEle
|
|||
ref={ref}
|
||||
{...props}
|
||||
>
|
||||
{feedInfo.feedType === 'following' ? (
|
||||
<UsersRound />
|
||||
) : feedInfo.feedType === 'bookmarks' ? (
|
||||
<BookmarkIcon />
|
||||
) : (
|
||||
<Server />
|
||||
)}
|
||||
{feedInfo.feedType === 'following' ? <UsersRound /> : <Server />}
|
||||
<div className="text-lg font-semibold truncate">{title}</div>
|
||||
<ChevronDown />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue