Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fe): fix drop down button rotate #2272

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions apps/frontend/components/auth/HeaderAuthPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default function HeaderAuthPanel({
const isEditor = group === 'editor'
const [needsUpdate, setNeedsUpdate] = useState(false)
const pathname = usePathname()
const [dropdownUpdate, setDropdownUpdate] = useState(false)
B0XERCAT marked this conversation as resolved.
Show resolved Hide resolved

useEffect(() => {
const checkIfNeedsUpdate = async () => {
Expand All @@ -71,7 +72,7 @@ export default function HeaderAuthPanel({
<div className="ml-2 flex items-center gap-2">
{session ? (
<>
<DropdownMenu>
<DropdownMenu onOpenChange={(open) => setDropdownUpdate(open)}>
<DropdownMenuTrigger
className={cn(
'hidden items-center gap-2 rounded-md px-4 py-1 md:flex',
Expand All @@ -89,7 +90,9 @@ export default function HeaderAuthPanel({
{session?.user.username}
</p>
)}
<ChevronDown className="w-4" />
<ChevronDown
className={cn('w-4 text-white', dropdownUpdate && 'rotate-180')}
/>
</DropdownMenuTrigger>
<DropdownMenuContent
className={cn(
Expand Down
Loading