fix: 시간 반영 외

This commit is contained in:
정기영 2024-08-09 13:00:45 +09:00
parent 7f6b8f9880
commit bd182f5c2a
4 changed files with 8 additions and 13 deletions

View File

@ -7,11 +7,12 @@ import BackIcon from '/src/assets/icons/back.svg?react';
export default function CreateArticle({ topic, title, onSubmit }) {
const [articleTitle, setArticleTitle] = useState('');
const [articleContent, setArticleContent] = useState('');
const [textAreaHeight, setTextAreaHeight] = useState('auto');
const handleInput = (e) => {
setArticleContent(e.target.value);
e.target.style.height = 'auto';
e.target.style.height = e.target.scrollHeight + 'px';
const { value, scrollHeight } = e.target;
setArticleContent(value);
setTextAreaHeight(scrollHeight + 'px');
};
return (
@ -48,6 +49,7 @@ export default function CreateArticle({ topic, title, onSubmit }) {
placeholder="내용을 입력하세요"
value={articleContent}
onChange={handleInput}
style={{ height: textAreaHeight, overflow: 'hidden' }}
></textarea>
</div>
<button

View File

@ -8,6 +8,7 @@ export default function StudentReportDetailPage() {
const { reportId } = useParams();
const { data } = useStudentReportDetail(reportId);
const report = data.data;
console.log(report);
const { allCount, correctCount, quizzes, title } = report;
const score = Math.round((100 * correctCount) / allCount);
return (

View File

@ -11,12 +11,8 @@ export default function TeacherReportsetDetailPage() {
const formatDate = (dateArray) => {
const date = new Date(...dateArray.slice(0, 6));
return date.toLocaleString('ko-KR', {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
hour12: true,
timeZone: 'Asia/Seoul',
});
};

View File

@ -11,12 +11,8 @@ export default function TeacherReportsetPage() {
const formatDate = (dateArray) => {
const date = new Date(...dateArray.slice(0, 6));
return date.toLocaleString('ko-KR', {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
hour12: true,
timeZone: 'Asia/Seoul',
});
};