From ddfd9fb286fc89e9f709c2fd9178a78987124a8b Mon Sep 17 00:00:00 2001 From: Manuel Date: Mon, 31 Jul 2023 20:57:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Align=20actions=20to=20the=20rig?= =?UTF-8?q?ht=20on=20manage=20invite=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/manage/users/invites.tsx | 32 +++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/pages/manage/users/invites.tsx b/src/pages/manage/users/invites.tsx index 5151d9932..73893ce7e 100644 --- a/src/pages/manage/users/invites.tsx +++ b/src/pages/manage/users/invites.tsx @@ -1,4 +1,14 @@ -import { ActionIcon, Button, Center, Flex, Pagination, Table, Text, Title } from '@mantine/core'; +import { + ActionIcon, + Button, + Center, + Flex, + Pagination, + Table, + Text, + Title, + createStyles, +} from '@mantine/core'; import { modals } from '@mantine/modals'; import { IconPlus, IconTrash } from '@tabler/icons-react'; import dayjs from 'dayjs'; @@ -18,6 +28,7 @@ const ManageUserInvitesPage = () => { } ); + const { classes } = useStyles(); const [activePage, setActivePage] = useState(0); const handleFetchNextPage = async () => { @@ -32,8 +43,6 @@ const ManageUserInvitesPage = () => { const currentPage = data?.pages[activePage]; - console.log(data?.pages); - return ( @@ -78,17 +87,17 @@ const ManageUserInvitesPage = () => { {currentPage.registrationTokens.map((token, index) => ( - - {token.id} + + {token.id} - + {dayjs(dayjs()).isAfter(token.expires) ? ( expired {dayjs(token.expires).fromNow()} ) : ( in {dayjs(token.expires).fromNow(true)} )} - + { modals.openContextModal({ @@ -130,4 +139,13 @@ const ManageUserInvitesPage = () => { ); }; +const useStyles = createStyles(() => ({ + tableIdCell: { + width: '100%', + }, + tableCell: { + whiteSpace: 'nowrap' + } +})); + export default ManageUserInvitesPage;