Skip to content

Commit

Permalink
feat: 모달에서 라우팅 시 모달 닫히도록 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Aug 24, 2024
1 parent b871efe commit b4409b6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
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 = ({
params,
}: {
params: { study: string; week: string };
}) => {
const pathname = usePathname();
if (!pathname.includes(`/${params.week}/success`)) {
return null;
}

return (
<Modal>
<Flex align="center" direction="column" gap="2.375rem" width="21rem">
Expand Down

0 comments on commit b4409b6

Please sign in to comment.