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
Admin user management #1393
Admin user management #1393
Conversation
cell: ({ getValue }) => ( | ||
<DataTableAction | ||
as={NextLink} | ||
href={ROUTES.ADMIN_MESSAGE_DETAIL(getValue())} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this page doesn't exists yet, I will add it in the next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! it would be great if you could make upcoming PRs smaller than this, it is easier to review.
}); | ||
}; | ||
|
||
const resetCursor = () => setPagination((old) => ({ ...old, cursor: "" })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useCallback
for these 3 functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 function will need a wrapper function to pass data, so useCallback has no effect here.
import { Badge, Flex } from "@chakra-ui/layout"; | ||
import { Tooltip } from "@chakra-ui/react"; | ||
import { createColumnHelper } from "@tanstack/table-core"; | ||
import { formatDistanceToNow, formatISO9075 } from "date-fns"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is something that next-i18n
already provides.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my knowledge, the answer is no. I'm pretty sure we'd have to use some new library to do this so date-fns seems good enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since @AbdBarho left some good comments, I have nothing else to add. Looks fine after those changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By special request by Andreas I'm going to approve and merge this. Maybe make the cleanups in a follow up PR?
part of #1022
UI