Skip to content

Commit

Permalink
Roles user card scroll fix (#154)
Browse files Browse the repository at this point in the history
* scroll fix

* added gap to user card
  • Loading branch information
DannySS123 authored Dec 19, 2024
1 parent 2e31d5e commit b7541d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/frontend/src/app/periods/[id]/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const columns: (
<HoverCardTrigger>
<div className='flex gap-2 items-center'>
<div className={`${getRoleBadgeColor(row.original.user.role, true)} h-6 w-1 rounded`} />
<p className=''>{row.original.user.fullName}</p>
<p>{row.original.user.fullName}</p>
{row.original.user.isActiveVikStudent && <RiVerifiedBadgeLine size={16} />}
</div>
</HoverCardTrigger>
Expand Down
3 changes: 1 addition & 2 deletions apps/frontend/src/components/ui/PassiveUserCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { FiEdit2, FiUser } from 'react-icons/fi';

import { Card, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
Expand All @@ -16,7 +15,7 @@ export default function UserCard(props: { user: UserEntity; onChange: (newRole:
className='lg:rounded-l-lg max-lg:rounded-lg max-w-20 h-fit aspect-auto -m-4 max-md:-my-4'
/>
<div className='overflow-scroll text-nowrap truncate justify-between flex flex-col h-auto'>
<CardTitle className=''>{props.user.fullName}</CardTitle>
<CardTitle>{props.user.fullName}</CardTitle>
<CardDescription className='flex sm:gap-4 max-sm:gap-0 max-sm:flex-col sm:flex-row'>
<p className='flex items-center gap-2'>
<FiUser />
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/ui/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Image from 'next/image';
export default function UserCard(props: { user: UserEntity; onChange: (newRole: Role) => Promise<void> }) {
return (
<Card>
<CardHeader className='flex flex-row w-full justify-between items-center p-4 overflow-scroll'>
<CardHeader className='flex flex-row w-full justify-between items-center p-4 overflow-auto gap-4'>
<div className='flex gap-8'>
<Image
src={`${process.env.NEXT_PUBLIC_API_URL}/users/${props.user.authSchId}/profile-picture`}
Expand All @@ -18,7 +18,7 @@ export default function UserCard(props: { user: UserEntity; onChange: (newRole:
height={64}
/>
<div className='overflow-scroll text-nowrap truncate justify-between flex flex-col h-auto'>
<CardTitle className=''>{props.user.fullName}</CardTitle>
<CardTitle>{props.user.fullName}</CardTitle>
<CardDescription className='flex sm:gap-4 max-sm:gap-0 max-sm:flex-col sm:flex-row'>
<p className='flex items-center gap-2'>
<FiUser />
Expand Down

0 comments on commit b7541d9

Please sign in to comment.