fix: adjust organisation dropdown size.

This commit is contained in:
killian-larcher
2026-01-28 19:48:40 +01:00
parent 1760c1b852
commit 7fcb3f2c31
3 changed files with 110 additions and 104 deletions
@@ -3,6 +3,7 @@ import {getAccounts, getSession, getSessions} from "@/lib/auth/auth";
import {LoggedInButtonClient} from "./logged-in-button";
import {SUPPORTED_PROVIDERS} from "../../../../../../portabase.config";
export const LoggedInButton = async () => {
const user = await currentUser();
const sessions = await getSessions();
@@ -16,7 +17,7 @@ export const LoggedInButton = async () => {
<LoggedInButtonClient
user={user}
sessions={sessions}
// @ts-ignore
// @ts-ignore
currentSession={currentSession.session}
accounts={accounts}
providers={SUPPORTED_PROVIDERS.filter((p) => p.isActive)}
@@ -1,6 +1,6 @@
"use client";
import {ChevronsUpDown, ChevronUp} from "lucide-react";
import {ChevronsUpDown} from "lucide-react";
import {Avatar, AvatarFallback, AvatarImage} from "@/components/ui/avatar";
import {SidebarMenuButton} from "@/components/ui/sidebar";
import {LoggedInDropdown} from "./logged-in-dropdown";
@@ -15,6 +15,7 @@ type LoggedInButtonClientProps = {
providers: AuthProviderConfig[]
}
export const LoggedInButtonClient = ({
user,
sessions,
@@ -35,14 +36,15 @@ export const LoggedInButtonClient = ({
accounts={accounts}
providers={providers}
>
<SidebarMenuButton type="button" className="h-auto justify-between py-2" >
<SidebarMenuButton type="button" className="h-auto justify-between py-2">
<div className="flex items-center gap-2">
<Avatar className="size-6">
<AvatarFallback>{user.name[0].toUpperCase()}</AvatarFallback>
{user.image && <AvatarImage src={user.image}/>}
</Avatar>
<div className="flex flex-col items-start">
<span className="text-sm font-medium first-letter:capitalize max-w-[170px] truncate">{user.name}</span>
<span
className="text-sm font-medium first-letter:capitalize max-w-[170px] truncate">{user.name}</span>
<span
className="text-xs text-muted-foreground max-w-[170px] truncate"
title={user.email}