Skip to content

Commit

Permalink
Merge pull request #125 from capstone-five-ai/develop
Browse files Browse the repository at this point in the history
v0.1.7
  • Loading branch information
AAminha authored Jun 15, 2024
2 parents 1cff1c9 + d94da3d commit 1633066
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/components/Form/QuizGenerationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ function QuizGenerationForm({
setQuizContent,
showWarning = false,
}: QuizFormProps) {
const [isCommentOpen, setIsCommentOpen] = useState(false);
const [isCommentOpen, setIsCommentOpen] = useState(true);
const { fireToast } = useToast();

useEffect(() => {
setIsCommentOpen(false);
setIsCommentOpen(true);
}, [quizType]);

useEffect(() => {
if (quizContent.problemCommentary === '') setIsCommentOpen(true);
if (showWarning && quizContent.problemCommentary === '')
setIsCommentOpen(true);
}, [showWarning]);

const handleChangeQuestion = (
Expand Down
7 changes: 6 additions & 1 deletion src/components/InputField/CategoryInputFieldContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ interface NewCategoryInputFieldProps
initialOpen?: boolean;
handleSubmit: () => void;
isError?: boolean;
disabledButton?: boolean;
}

function CategoryInputFieldContainer({
initialOpen = true,
handleSubmit,
isError = false,
disabledButton = false,
...props
}: NewCategoryInputFieldProps) {
const [openInput, setOpenInput] = useState(initialOpen);
return (
<StyledContainer>
<StyledAddButton onClick={() => setOpenInput((prev) => !prev)}>
<StyledAddButton
onClick={() => setOpenInput((prev) => !prev)}
disabled={disabledButton}
>
<AddIcon />
<span>카테고리 추가</span>
</StyledAddButton>
Expand Down
1 change: 1 addition & 0 deletions src/components/Modal/NewCategoryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function NewCategoryModal({
initialOpen
handleSubmit={handleGenerateNewCategory}
isError={showWarn}
disabledButton
/>
</StyledModalContentContainer>
</DefaultModal>
Expand Down
1 change: 0 additions & 1 deletion src/containers/QuizAIPage/GenerateSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,4 @@ const StyledUploadContent = styled(StyledContent)`

const StyledTextContent = styled(StyledContent)`
padding: 24px 36px;
padding-right: 20px;
`;
1 change: 0 additions & 1 deletion src/containers/SummaryAIPage/GenerateSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,4 @@ const StyledUploadContent = styled(StyledContent)`

const StyledTextContent = styled(StyledContent)`
padding: 24px 36px;
padding-right: 20px;
`;
1 change: 0 additions & 1 deletion src/containers/SummaryUserPage/GenerateSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ export default GenerateSection;
const StyledContent = styled.div`
flex: 1;
padding: 24px 36px;
padding-right: 20px;
`;

0 comments on commit 1633066

Please sign in to comment.