diff --git a/apps/admin/app/studies/[study]/assignments/[week]/@modal/(.)success/page.tsx b/apps/admin/app/studies/[study]/assignments/[week]/@modal/(.)success/page.tsx index 82fd60c7..31546005 100644 --- a/apps/admin/app/studies/[study]/assignments/[week]/@modal/(.)success/page.tsx +++ b/apps/admin/app/studies/[study]/assignments/[week]/@modal/(.)success/page.tsx @@ -3,6 +3,7 @@ import { Flex, styled } from "@styled-system/jsx"; import { Modal, Text } from "@wow-class/ui"; import Link from "next/link"; +import { usePathname } from "next/navigation"; import Button from "wowds-ui/Button"; const AssignmentSuccessModal = ({ @@ -10,6 +11,11 @@ const AssignmentSuccessModal = ({ }: { params: { study: string; week: string }; }) => { + const pathname = usePathname(); + if (!pathname.includes(`/${params.week}/success`)) { + return null; + } + return (