fix: some bugs
This commit is contained in:
@@ -7,9 +7,9 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { toProfile, toWallet } from '@/lib/link'
|
||||
import { toWallet } from '@/lib/link'
|
||||
import { formatPubkey, generateImageByPubkey } from '@/lib/pubkey'
|
||||
import { useSecondaryPage } from '@/PageManager'
|
||||
import { usePrimaryPage, useSecondaryPage } from '@/PageManager'
|
||||
import { useNostr } from '@/providers/NostrProvider'
|
||||
import { ArrowDownUp, LogIn, LogOut, UserRound, Wallet } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
@@ -32,6 +32,7 @@ function ProfileButton() {
|
||||
const { t } = useTranslation()
|
||||
const { account, profile } = useNostr()
|
||||
const pubkey = account?.pubkey
|
||||
const { navigate } = usePrimaryPage()
|
||||
const { push } = useSecondaryPage()
|
||||
const [loginDialogOpen, setLoginDialogOpen] = useState(false)
|
||||
const [logoutDialogOpen, setLogoutDialogOpen] = useState(false)
|
||||
@@ -59,7 +60,7 @@ function ProfileButton() {
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent side="top">
|
||||
<DropdownMenuItem onClick={() => push(toProfile(pubkey))}>
|
||||
<DropdownMenuItem onClick={() => navigate('profile')}>
|
||||
<UserRound />
|
||||
{t('Profile')}
|
||||
</DropdownMenuItem>
|
||||
|
||||
@@ -98,7 +98,7 @@ export default function Tabs({
|
||||
key={tab.value}
|
||||
ref={(el) => (tabRefs.current[index] = el)}
|
||||
className={cn(
|
||||
`w-fit text-center py-2 px-6 my-1 font-semibold clickable cursor-pointer rounded-lg`,
|
||||
`w-fit text-center py-2 px-6 my-1 font-semibold whitespace-nowrap clickable cursor-pointer rounded-lg`,
|
||||
value === tab.value ? '' : 'text-muted-foreground'
|
||||
)}
|
||||
onClick={() => {
|
||||
|
||||
@@ -57,6 +57,7 @@ const SearchPage = forwardRef(({ index }: { index?: number }, ref) => {
|
||||
<SearchBar ref={searchBarRef} input={input} setInput={setInput} onSearch={onSearch} />
|
||||
</div>
|
||||
}
|
||||
displayScrollToTopButton
|
||||
>
|
||||
<SearchResult searchParams={searchParams} />
|
||||
</SecondaryPageLayout>
|
||||
|
||||
Reference in New Issue
Block a user