feat: simplify account creation flow
This commit is contained in:
parent
cd7c52eda0
commit
a880a92748
35 changed files with 1247 additions and 222 deletions
|
|
@ -60,39 +60,41 @@ export default function FollowButton({ pubkey }: { pubkey: string }) {
|
|||
}
|
||||
|
||||
return isFollowing ? (
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger asChild>
|
||||
<Button
|
||||
className="rounded-full min-w-28"
|
||||
variant={hover ? 'destructive' : 'secondary'}
|
||||
disabled={updating}
|
||||
onMouseEnter={() => setHover(true)}
|
||||
onMouseLeave={() => setHover(false)}
|
||||
>
|
||||
{updating ? (
|
||||
<Loader className="animate-spin" />
|
||||
) : hover ? (
|
||||
t('Unfollow')
|
||||
) : (
|
||||
t('buttonFollowing')
|
||||
)}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{t('Unfollow')}?</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
{t('Are you sure you want to unfollow this user?')}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>{t('Cancel')}</AlertDialogCancel>
|
||||
<AlertDialogAction onClick={handleUnfollow} variant="destructive">
|
||||
{t('Unfollow')}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<AlertDialog>
|
||||
<AlertDialogTrigger asChild>
|
||||
<Button
|
||||
className="rounded-full min-w-28"
|
||||
variant={hover ? 'destructive' : 'secondary'}
|
||||
disabled={updating}
|
||||
onMouseEnter={() => setHover(true)}
|
||||
onMouseLeave={() => setHover(false)}
|
||||
>
|
||||
{updating ? (
|
||||
<Loader className="animate-spin" />
|
||||
) : hover ? (
|
||||
t('Unfollow')
|
||||
) : (
|
||||
t('buttonFollowing')
|
||||
)}
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
<AlertDialogTitle>{t('Unfollow')}?</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
{t('Are you sure you want to unfollow this user?')}
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
<AlertDialogFooter>
|
||||
<AlertDialogCancel>{t('Cancel')}</AlertDialogCancel>
|
||||
<AlertDialogAction onClick={handleUnfollow} variant="destructive">
|
||||
{t('Unfollow')}
|
||||
</AlertDialogAction>
|
||||
</AlertDialogFooter>
|
||||
</AlertDialogContent>
|
||||
</AlertDialog>
|
||||
</div>
|
||||
) : (
|
||||
<Button className="rounded-full min-w-28" onClick={handleFollow} disabled={updating}>
|
||||
{updating ? <Loader className="animate-spin" /> : t('Follow')}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue