- ์งํ๊ธฐ๊ฐ : 10/07 ~ 10/10
- ๊ณผ์ ์ฃผ๊ด : (์ฃผ)๋ฐ๋ง
- ์ฐธ์ฌ๋ช ๋จ : ๊น๋ฏผ์ฑ, ์์ฌํ, ์์ํฌ, ์ ๊ดํ, ์ ํ์กฐ, ์กฐ๋ฏผ์ฌ
- DEMO : DEMO
MISSION 1
- TypeScript ์ฌ์ฉํจ์ CustomType ์ ์ฉ
//TableHeader.tsx
<Sorter
width={header.getSize()}
isSortable={header.column.getCanSort()}
onClick={header.column.getToggleSortingHandler()}
>
{header.isPlaceholder
? null
: flexRender(header.column.columnDef.header, header.getContext())}
{
{
asc: <FaSortUp />,
desc: <FaSortDown />,
}[header.column.getIsSorted() as SortDirection]
}
</Sorter>
...
const Sorter = styled.div<CustomSorter>`
width: ${({ width }) => width};
cursor: ${({ isSortable }) => (isSortable ? "pointer" : "default")};
-
react-table ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํํฐ๋ง ๊ด๋ จ ํจ์๋ค์ importํ์ฌ ํํฐ๋ง ๊ธฐ๋ฅ์ ๊ตฌํํ์์ต๋๋ค.
๊ฐ ์ด์ด ํํฐ๋ง์ด ๊ฐ๋ฅํ์ง ์๋์ง ์ฌ๋ถ๋ฅผ ํ๋จํ๊ธฐ ์ํด getCanFilter๋ฅผ ์ฌ์ฉํ์ฌ, ํํฐ๋ง์ด ๋์ง ์๋ ์ด์๋ ๋๋กญ๋ค์ด์ด ๋ณด์ด์ง ์๋๋ก ์ค์ ํ์์ต๋๋ค.
<ColumnFilter>
{header.column.getCanFilter() ? (
<select onChange={({ currentTarget: { value } }) => onFilterChange(value)}>
<option value='null'>All</option>
{sortedUniqueValues.map((value) => (
<option key={value}>{value}</option>
))}
</select>
) : null}
</ColumnFilter>
-
๋ค์ํ ๋๋ฐ์ด์ค์ ๋ค์ํ ํ๋ฉด ํฌ๊ธฐ์ ์ ์ฐํ๊ฒ ์๋ํ ์ ์๋๋ก ๋ฐ์ํ์ผ๋ก ๊ตฌํ
media queries๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐ์ํ ํ์ด์ง๋ฅผ ๊ตฌํํ์์ต๋๋ค.
overflow: scroll
์ ์ฌ์ฉํ์ฌ ์คํฌ๋กค๊ธฐ๋ฅ์ผ๋ก mobile, tablet, desktop ๋ฑ ์์ ์ฌ์ฉ๊ฐ๋ฅํ ๋ฐ์ํ ํ์ด์ง๋ก ๊ตฌํํ์์ต๋๋ค.
MISSION 2
- ย ย ์ ์๋ API๋ ์ด 100๊ฐ์ ๋ฐฐ์ด๋ก ๋ฐ์ดํฐ๋ฅผ ์ ๊ณตํจ์ผ๋ก์จ ๋ง์์ผ ์ดํ์น ๋ถ๋์ ๋ฐ์ดํฐ๋ง ์ ๊ณตํด์ค๋๋ค. 24์๊ฐ์ ์จ์ ํ ๊ฐ์ง๊ณ ์์ง ์๋ ๊ฒฝ์ฐ๋ ์์ด์ ๋ฐ๋ก ๋ฐ์ดํฐ ๊ฐ๊ณต์ ๊ฑฐ์ณค์ต๋๋ค.
const CSVdata: Array<Object | undefined[] | any> = [
['Channer'],
['Created at', weatherData?.channel.created_at],
['Description', weatherData?.channel.description],
['Latitude', weatherData?.channel.latitude],
['Longitude', weatherData?.channel.longitude],
['Name', weatherData?.channel.name],
['Updated at', weatherData?.channel.updated_at],
[''],
['Feeds'],
['Created at', 'Entry ID', 'Temp', 'Humidity', 'Pressure'],
...(weatherData?.feeds.map((i) => {
const { created_at, entry_id, field1, field2, field3 } = i;
const arrayData = [created_at, entry_id, field1, field2, field3];
return arrayData;
}) || []),
];
- ย ย ์ฌ์ฉ์์ ํธ์์ฑ์ ๊ณ ๋ คํ์ฌ +, - ๋ฒํผ์ด ์๋ ๋ง์ฐ์ค ํ ๋ก ํ๋ ์ถ์๊ฐ ๊ฐ๋ฅํ๋๋ก ๊ตฌํ
MISSION 3
- ๋ ์ง ์ ํ ์ ์บ๋ฆฐ๋ UI ์ ์ฉ
- TypeScript ์ฌ์ฉ
-
๐Meeting Log ๋ด์ฉ๋ณด๊ธฐ!
-
๐Task ๋ด์ฉ๋ณด๊ธฐ!
-
๐Conventions ๋ด์ฉ๋ณด๊ธฐ!