mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2025-08-27 13:09:22 +00:00
Fix AccountSwitcher
This commit is contained in:
parent
360b9062b8
commit
b4605cf672
@ -1,4 +1,4 @@
|
|||||||
import { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { ChevronDown, LogOut, User, UserPlus } from 'lucide-react';
|
import { ChevronDown, LogOut, User, UserPlus } from 'lucide-react';
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
@ -49,13 +49,27 @@ export function AccountSwitcher() {
|
|||||||
|
|
||||||
if (!isLoggedIn) {
|
if (!isLoggedIn) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<>
|
||||||
onClick={() => setLoginDialogOpen(true)}
|
<Button
|
||||||
className='flex items-center gap-2 px-4 py-2 rounded-full bg-primary text-primary-foreground w-full font-medium transition-all hover:bg-primary/90 animate-scale-in'
|
onClick={() => setLoginDialogOpen(true)}
|
||||||
>
|
className='flex items-center gap-2 px-4 py-2 rounded-full bg-primary text-primary-foreground w-full font-medium transition-all hover:bg-primary/90 animate-scale-in'
|
||||||
<User className='w-4 h-4' />
|
>
|
||||||
<span>Log in</span>
|
<User className='w-4 h-4' />
|
||||||
</Button>
|
<span>Log in</span>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<LoginForm
|
||||||
|
isOpen={loginDialogOpen}
|
||||||
|
onClose={() => setLoginDialogOpen(false)}
|
||||||
|
onLogin={handleLogin}
|
||||||
|
onSignup={() => setSignupDialogOpen(true)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SignupForm
|
||||||
|
isOpen={signupDialogOpen}
|
||||||
|
onClose={() => setSignupDialogOpen(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user