-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
940ac02
commit 25df6bc
Showing
2 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { BACK_TO_ARTICLE_WORDS } from "@problem/constants/backToArticle"; | ||
import { ProblemAnswerMuationState } from "@problem/types/problemInfo"; | ||
|
||
export class AnswerStatusModel { | ||
constructor({ | ||
problemAnswerInfo, | ||
}: { | ||
problemAnswerInfo: ProblemAnswerMuationState | undefined; | ||
}) { | ||
this.problemAnswerInfo = problemAnswerInfo; | ||
} | ||
|
||
get problemSolvedStatus() { | ||
return this.problemAnswerInfo | ||
? BACK_TO_ARTICLE_WORDS.AFTER | ||
: BACK_TO_ARTICLE_WORDS.BEFORE; | ||
} | ||
|
||
get isProblemAnswerInfo() { | ||
return Boolean(this.problemAnswerInfo); | ||
} | ||
|
||
private problemAnswerInfo: ProblemAnswerMuationState | undefined; | ||
} |