Skip to content

Commit fbe3ee7

Browse files
committed
chore: update open modal to redirect to my events
1 parent 108a5c4 commit fbe3ee7

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/features/events/components/ColumnsUserEventList.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import { Button } from "@/components/ui/Button";
44
import { formatDateEvent } from "@/lib/format";
55
import { ColumnDef } from "@tanstack/react-table";
66
import { Eye } from "lucide-react";
7-
import { useDialog } from "@/contexts/dialogContext";
8-
import { EventDetailModal } from "./EventDetailModal";
97
import { UserEventResponse } from "../types/userEvent";
8+
import { useRouter } from "@/lib/navigation";
109

1110
export const columnsUserEventList: ColumnDef<UserEventResponse>[] = [
1211
{
@@ -50,15 +49,10 @@ export const columnsUserEventList: ColumnDef<UserEventResponse>[] = [
5049
];
5150

5251
function ViewEventButton({ event }: { event: UserEventResponse }) {
53-
const { openDialog } = useDialog();
52+
const router = useRouter();
5453

5554
const handleViewDetails = () => {
56-
openDialog({
57-
title: "Event Details",
58-
content: <EventDetailModal event={event} />,
59-
size: "xl",
60-
className: "h-[80%]",
61-
});
55+
router.push(`/my-events/${event.order_no}`);
6256
};
6357

6458
return (

0 commit comments

Comments
 (0)