- 정렬과 타이머 기능을 가진 프로그램 구현
- 솔라커넥트에서 제공하는 케이스형 과제
https://pob-coconut.github.io/Assignment6-TH-SW
이름 | GitHub | 역할 |
---|---|---|
김승원 | lumpenop | 정렬 |
남택훈 | tech-hoon | 타이머, 유효성 검증, CSS |
npm install
npm start
- 정규표현식을 이용한
input
의 유효성 검사 및 예외 처리
const regex = /([-0-9]+,){1,}([-0-9+]+)/
- 한국 시간에 맞게
Date
객체 생성
const UTC = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000;
const KST = UTC + TIME_OFFSET; // OFFSET = 9h
const KR_TIME = new Date(KST).toLocaleDateString(type, options);
Bubble Sort
를 통한, 오름/내림차순 정렬 구현useInput
,useTimer
등 custom hook- 재사용 가능한
Timer
,Result
컴포넌트 구성
Regular Expression: https://regexr.com/
Date object: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Date