Skip to content

Commit

Permalink
chore: submissionLink null 로 내려오는 부분 우선 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
SeieunYoo committed Sep 4, 2024
1 parent 172f10c commit 329f205
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { padWithZero, parseISODate } from "@wow-class/utils";
import { routePath } from "constants/routePath";
import Link from "next/link";
import type { ComponentProps } from "react";
import type { AssignmentSubmissionStatusType } from "types/entities/common/assignment";
import type { AssignmentSubmissionStatusType } from "types/entities/myStudy";
import Box from "wowds-ui/Box";
import Button from "wowds-ui/Button";
import Tag from "wowds-ui/Tag";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const PrimaryButton = ({
const stroke = buttonsDisabled ? "mono100" : "primary";
const link =
assignmentSubmissionStatus === null ? repositoryLink : submissionLink;

return (
<Button
asProp={Link}
Expand Down Expand Up @@ -137,7 +138,12 @@ const SecondaryButton = ({
if (response.success) {
//TODO: 과제 제출 이후에는 과제 상태에 대한 업데이트 필요
//이번주 과제 조회 api, 대시보드 api revaliate
revalidateTagByName(tags.studyDetailDashboard);
revalidateTagByName(
assignmentSubmissionStatus === null
? tags.studyDetailDashboard
: tags.upcomingStudy
);
revalidateTagByName(tags.studyHistory);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { Text } from "@wow-class/ui";
import { padWithZero, parseISODate } from "@wow-class/utils";
import Image from "next/image";
import type { Assignment } from "types/dtos/studyDetail";
import { getAssignmentGithubFolderName } from "utils/getAssignmentGithubFolderName";

import { FailurePopover } from "./FailurePopover";
interface AssignmentBoxInfoProps {
assignment: Assignment;
}

export const AssignmentBoxInfo = ({ assignment }: AssignmentBoxInfoProps) => {
export const AssignmentBoxInfo = async ({
assignment,
}: AssignmentBoxInfoProps) => {
const {
deadline,
assignmentSubmissionStatus,
Expand All @@ -36,7 +37,7 @@ export const AssignmentBoxInfo = ({ assignment }: AssignmentBoxInfoProps) => {
<Text as="div" color="sub">
제출한 과제
<Text as="span" color="textBlack">
{getAssignmentGithubFolderName(submissionLink)}
과제 이름
</Text>
</Text>
<Image alt="dot" height={6} src="/images/dot.svg" width={6} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const tagContainerStyle = css({
paddingX: "22px",
width: "129px",
alignItems: "center",
flexDirection: "column",
});

const assignmentSubmissionMap: Record<
Expand Down

0 comments on commit 329f205

Please sign in to comment.