Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat(admin): let impersonation and switch-user dropdowns grow to fit their rows

Gilad Resisi651e5bc10a19
diff --git a/apps/frontend/src/components/layout/impersonate.tsx b/apps/frontend/src/components/layout/impersonate.tsx
index a817a55c5..9d01dee8d 100644
--- a/apps/frontend/src/components/layout/impersonate.tsx
+++ b/apps/frontend/src/components/layout/impersonate.tsx
@@ -989,12 +989,12 @@ const SwitchUser = () => {
className="bg-primary/80 fixed start-0 top-0 w-full h-full z-[998]"
onClick={() => setName('')}
/>
- <div className="absolute top-[100%] start-0 w-full bg-sixth border border-customColor6 text-textColor z-[999]">
+ <div className="absolute top-[100%] start-0 w-max min-w-full max-w-[90vw] bg-sixth border border-customColor6 text-textColor z-[999]">
{mapData.map((item: any) => (
<div
onClick={pick(item)}
key={item.id}
- className="p-[10px] border-b border-customColor6 hover:bg-tableBorder cursor-pointer"
+ className="p-[10px] border-b border-customColor6 hover:bg-tableBorder cursor-pointer whitespace-nowrap truncate"
>
{t('user_1', 'user:')}
{item.id.split('-').at(-1)} -{' '}
@@ -1125,12 +1125,12 @@ export const Impersonate = () => {
className="bg-primary/80 fixed start-0 top-0 w-full h-full z-[998]"
onClick={() => setName('')}
/>
- <div className="absolute top-[100%] w-full start-0 bg-sixth border border-customColor6 text-textColor z-[999]">
+ <div className="absolute top-[100%] w-max min-w-full max-w-[90vw] start-0 bg-sixth border border-customColor6 text-textColor z-[999]">
{mapData?.map((user: any) => (
<div
onClick={setUser(user.id)}
key={user.id}
- className="p-[10px] border-b border-customColor6 hover:bg-tableBorder cursor-pointer"
+ className="p-[10px] border-b border-customColor6 hover:bg-tableBorder cursor-pointer whitespace-nowrap truncate"
>
{t('user_1', 'user:')}
{user.id.split('-').at(-1)} - {user.name} - {user.email} -{' '}