mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-24 14:26:23 +02:00
Refactor admin and participant page (#464)
This commit is contained in:
parent
875e48f1fe
commit
d397654de7
20 changed files with 348 additions and 236 deletions
|
@ -28,7 +28,7 @@ const Discussion: React.VoidFunctionComponent = () => {
|
|||
const { dayjs } = useDayjs();
|
||||
const queryClient = trpc.useContext();
|
||||
const { t } = useTranslation("app");
|
||||
const { poll } = usePoll();
|
||||
const { poll, admin } = usePoll();
|
||||
|
||||
const pollId = poll.id;
|
||||
|
||||
|
@ -93,7 +93,7 @@ const Discussion: React.VoidFunctionComponent = () => {
|
|||
<AnimatePresence initial={false}>
|
||||
{comments.map((comment) => {
|
||||
const canDelete =
|
||||
poll.admin || session.ownsObject(comment) || isUnclaimed(comment);
|
||||
admin || session.ownsObject(comment) || isUnclaimed(comment);
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue