feat: rizful

This commit is contained in:
codytseng 2025-09-29 23:36:49 +08:00
parent 520649e862
commit 6357fd5b44
32 changed files with 812 additions and 123 deletions

View file

@ -0,0 +1,31 @@
import { toWallet } from '@/lib/link'
import { useSecondaryPage } from '@/PageManager'
import { useNostr } from '@/providers/NostrProvider'
import storage from '@/services/local-storage.service'
import { useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import { toast } from 'sonner'
export default function CreateWalletGuideToast() {
const { t } = useTranslation()
const { push } = useSecondaryPage()
const { profile } = useNostr()
useEffect(() => {
if (
profile &&
!profile.lightningAddress &&
!storage.hasShownCreateWalletGuideToast(profile.pubkey)
) {
toast(t('Set up your wallet to send and receive sats!'), {
action: {
label: t('Set up'),
onClick: () => push(toWallet())
}
})
storage.markCreateWalletGuideToastAsShown(profile.pubkey)
}
}, [profile])
return null
}

View file

@ -17,7 +17,7 @@ const buttonVariants = cva(
'secondary-2': 'bg-secondary text-secondary-foreground hover:bg-primary',
ghost: 'clickable hover:text-accent-foreground',
'ghost-destructive': 'cursor-pointer hover:bg-destructive/20 text-destructive',
link: 'text-primary underline-offset-4 hover:underline'
link: 'text-foreground underline-offset-4 hover:underline'
},
size: {
default: 'h-9 px-4 py-2',