Skip to content

POB-Coconut/Assignment6-TH-SW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

원티드 프리온보딩(프론트엔드) - 솔라커넥트

프로젝트 개요

  • 정렬과 타이머 기능을 가진 프로그램 구현
  • 솔라커넥트에서 제공하는 케이스형 과제

데모 링크

https://pob-coconut.github.io/Assignment6-TH-SW

프로젝트 멤버

이름 GitHub 역할
김승원 lumpenop 정렬
남택훈 tech-hoon 타이머, 유효성 검증, CSS

실행 방법

Setup

npm install

Run

npm start

구현 기능

  1. 정규표현식을 이용한 input의 유효성 검사 및 예외 처리
const regex = /([-0-9]+,){1,}([-0-9+]+)/
  1. 한국 시간에 맞게 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);
  1. Bubble Sort를 통한, 오름/내림차순 정렬 구현
  2. useInput, useTimer 등 custom hook
  3. 재사용 가능한 Timer, Result 컴포넌트 구성

데모 영상

sorting-demo

참고

Regular Expression: https://regexr.com/

Date object: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Date