Skip to content

Commit

Permalink
chore: 인공지능 기능 이용 불가 안내
Browse files Browse the repository at this point in the history
- 추후 기능 재개시 주석 해제 필요
  - src/pages/Main/TestMake/TestMake.tsx
  - src/pages/Main/MyScript/MyScript.tsx
  • Loading branch information
Nangniya committed Nov 11, 2024
1 parent 0c2f9f0 commit f66dade
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
14 changes: 11 additions & 3 deletions src/pages/Main/MyScript/MyScript.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
//import { Link } from 'react-router-dom';
import { useQuery } from '@tanstack/react-query';
import ScriptDetailModal from '../../../components/templates/modals/ScriptDetailModal/ScriptDetailModal';
import ScriptItem from '../../../components/molecules/ScriptItem/ScriptItem';
Expand Down Expand Up @@ -37,9 +37,17 @@ const MyScript = () => {
<div className={styles.wholeContainer}>
<div className={styles.headerContainer}>
<div className={styles.recentScripts}>최근 스크립트</div>
<Link to="/record">
{/* <Link to="/record">
<StartingButton>녹음 시작</StartingButton>
</Link>
</Link> */}
{/* 임시로 이용 불가 조치 */}
<div
onClick={() =>
addAlert('현재 인공지능 기능은 이용 불가합니다.', 'error')
}
>
<StartingButton>녹음 시작</StartingButton>
</div>
</div>
{!data || data?.object?.length === 0 ? (
<div className={styles.noneScriptContainer}>
Expand Down
32 changes: 17 additions & 15 deletions src/pages/Main/TestMake/TestMake.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useNavigate } from 'react-router-dom';
//import { useNavigate } from 'react-router-dom';
import { useQuery } from '@tanstack/react-query';
import TestOptionSelector from '../../../components/organisms/TestOptionSelector/TestOptionSelector';
import ScriptItem from '../../../components/molecules/ScriptItem/ScriptItem';
Expand All @@ -10,7 +10,7 @@ import useServerErrorToast from '../../../hooks/useServerErrorToast';
import styles from './TestMake.module.scss';

const TestMake = () => {
const navigate = useNavigate();
//const navigate = useNavigate();
const addAlert = useAlertStore((state) => state.addAlert);

const { data, isError } = useQuery({
Expand All @@ -23,9 +23,9 @@ const TestMake = () => {

const {
lectureId,
questionCount,
questionTypes,
timeLimit,
// questionCount,
// questionTypes,
// timeLimit,
setLectureId,
setScheduleElementId,
setTestName,
Expand All @@ -42,16 +42,18 @@ const TestMake = () => {
};

const handleTestStartBtnClick = () => {
if (
lectureId.length > 0 &&
questionCount > 0 &&
questionTypes.length > 0 &&
(timeLimit === null || timeLimit > 0)
) {
navigate('/test');
} else {
addAlert('스크립트와 문제 유형, 문제 개수를 모두 선택해주세요.', 'error');
}
// if (
// lectureId.length > 0 &&
// questionCount > 0 &&
// questionTypes.length > 0 &&
// (timeLimit === null || timeLimit > 0)
// ) {
// navigate('/test');
// } else {
// addAlert('스크립트와 문제 유형, 문제 개수를 모두 선택해주세요.', 'error');
// }
// 임시로 이용 불가 조치
addAlert('현재 인공지능 기능은 이용 불가합니다.', 'error');
};

return (
Expand Down

0 comments on commit f66dade

Please sign in to comment.