build: 패키지 정리

main
Lim Jonguk 3 years ago
parent 874d26d56e
commit 8b072b9f29

@ -82,6 +82,12 @@ useEffect(() => {
useRef : 클래스로 치면 멤버변수 혹은 dom객체 처럼 특정한 '값'만 기억해야 할 때
useMemo : 복잡한 함수의 'retur값'을 기억해야 할 때
```
### typeof : primitive type string return vs instanceof
```js
'undefined' | 'boolean' | 'number' | 'string' | 'object' | 'function'
date-fns
moment
typeof 변수명
typeof 변수명 === 'object'
변수명 instanceof 클래스
```

@ -28,6 +28,7 @@
"chance": "^1.1.8",
"core-js": "^3",
"csstype": "^3.0.10",
"date-fns": "^2.28.0",
"draft-js": "^0.11.7",
"emoji-picker-react": "^3.5.1",
"formik": "^2.2.9",

@ -4,7 +4,6 @@ import _ from 'lodash';
import format from 'date-fns/format';
import getYear from 'date-fns/getYear';
// material-ui
import { GridActionsCellItem } from '@mui/x-data-grid';
import { Divider, Grid, InputAdornment, MenuItem, OutlinedInput, Select } from '@mui/material';
@ -26,13 +25,10 @@ import xitCmm from 'commons/XitCmm';
const ParkingReview = () => {
const theme = useTheme();
const year = getYear(new Date());
console.log(`year = ${year}`);
console.log(year instanceof Date);
const toYear = Number(year);
console.log(`toYear = ${toYear}`);
const years = _.range(toYear, toYear - 14, -1);
console.log(typeof year);
const years = _.range(year, year - 14, -1);
const [selectedYear, setSelectedYear] = useState(toYear);
const [selectedYear, setSelectedYear] = useState(year);
const [searchTxt, setSearchTxt] = useState('');
const [totalCount, setTotalCount] = useState(0);
@ -138,7 +134,7 @@ const ParkingReview = () => {
<Grid container spacing={1}>
<Grid item>
<MuiTooltip title="의견진술 심의 년도">
<Select id="reviewYear" name="reviewYear" defaultValue={toYear} onChange={(e) => setSelectedYear(e.target.value)}>
<Select id="reviewYear" name="reviewYear" defaultValue={year} onChange={(e) => setSelectedYear(e.target.value)}>
{years.map((year, idx) => (
<MenuItem key={idx} value={year}>
{year}

Loading…
Cancel
Save