-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add: ๊ธฐ๋ฅ ์ถ๊ฐ1 * add: ๊ธฐ๋ฅ์ถ๊ฐ2 * ingress endpoint ํํธ ์ด์ (#6) * v0.0.0 (#4) * add: ๊ธฐ๋ฅ ์ถ๊ฐ1 * add: ๊ธฐ๋ฅ์ถ๊ฐ2 * add: home ์ด๋ * [ADD] ์ค๋ ํ๋ฃจ๊ฐ ์ผ๋ง๋ ์๋ฒฝํ์ง ์๋ ค์ฃผ๋ ๋ด์ฉ ์ถ๊ฐ (#8) * [ADD] json ํ์ ๋ฐํ๊ฐ ์ถ๊ฐ ํ ์คํธ์ ๋๋ค * [ADD] ์ค๋ ํ๋ฃจ๊ฐ ์ผ๋ง๋ ์๋ฒฝํ์ง ์๋ ค์ฃผ๋ ๋ด์ฉ ์ถ๊ฐ * add: ok ์ถ๊ฐ Co-authored-by: Kyungeun <[email protected]> * home ํ์ด์ง์ ํ ์คํธ ์ถ๊ฐ (#12) * add: ํ ์คํธ ์ถ๊ฐ * add: ๊ธฐ๋ฅ ์ถ๊ฐ2 * ๋ธ๋์น ๋ณ๊ฒฝ์ ๋ฐ๋ฅธ ํ ์คํธ (#15) * add: ํ ์คํธ ์ถ๊ฐ * add: ๊ธฐ๋ฅ ์ถ๊ฐ2 * add: ํ ์คํธ๋ฅผ ์ํ ๋ฒํผ ์ถ๊ฐ * add: ๊ธฐ๋ฅ ์ถ๊ฐ * add: ๊ธฐ๋ฅ์ถ๊ฐ2 * ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ์ค์ , recoil (#27) * init: ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ ๋ณ๊ฒฝ * docs: ํด๋ ๊ตฌ์กฐ์ ๋ํ ์ค๋ช README.md์ ์ถ๊ฐ * package: recoil ํจํค์ง ์ค์น * docs: README.md ์ ํจํค์ง ๋ฒ์ ๊ด๋ จ ํญ๋ชฉ ์ถ๊ฐ ๋ฐ ์ปค๋ฐ ๊ท์น ์ถ๊ฐ * up: ์ธ๋ฏธ ์ฝ๋ก ์ ๊ฑฐ * add: _app.tsx ํ์ผ ์ถ๊ฐ ๋ฐ RecoilRoot ์ฌ์ฉ * add: recoil ํ ์คํธ๋ฅผ ์ํ ์ฝ๋ ์์ฑ * del: ๋จ์์๋ test script ์ญ fix: ๋จ์์๋ yarn to npm ์ผ๋ก ๋ง์ด๊ทธ๋ ์ด์ test: ํฌ๋ฉงํ ๊ฒ์ฌ * test: ํฌ๋ฉงํ ๊ฒ์ฌ๋ฅผ ์ํด ํ ์คํธ ์ถ๊ฐ * fix: push์ ์๋ ํฌ๋ฉงํฐ ํ์ฑํ * docs: history ๋ฐ์ * del: commit ์ผ๋ก ์๋ ํฌ๋ฉงํฐ ๋ณ๊ฒฝ docs: ๋ฌธ์ ๋ฐ์ * test: ํฌ๋ฉงํฐ ๊ฒ์ฌ๋ฅผ ์ํด ts ํ์ผ ํ์ฅ์๋ก ๋ณ๊ฒฝ * docs: ํ์คํ ๋ฆฌ ๋ฌธ์ ๋ฐ์ * test: ํฌ๋ฉงํฐ๋ฅผ ๊ฐ์ ๋ก ํธ๋ฆฌ๊ฑฐ ์ํค๊ธฐ ์ํด ์์ ํฉ๋๋ค. * style: prettier ์ธ๋ดํธ * up: ์ด์ ํ์ผ์ผ๋ก ์์๋ณต๊ตฌ Co-authored-by: Kyungeun <[email protected]> * ์ค๋ ํ ์ผ ํ์ด์ง์ ์ปดํฌ๋ํธ ๊ธฐ๋ฅ ๊ตฌํ (#31) * docs: ํด๋๊ตฌ์กฐ ์ปดํฌ๋ํธ ๋ด์ฉ ์ถ๊ฐ * docs: #28 - ์๊ฐ ํ์ดํ ์ถ๊ฐ Run Time ํ๊ฒฝ์ ๋ํ ๋ด์ฉ์ ์ถํ์ ์ถ๊ฐํ ์์ ๋์์ README ๋ด์ฉ๊ณผ ๋์์ธ์ ๋ํ ๋ถ๋ถ์ ์ ์ฒด์ ์ผ๋ก ์์ ์์ ์ ๋๋ค. * fix: #29 - ํจ์ํ ์ปดํฌ๋ํธ ๋ฐ ํ์ด์ง ํํ ์์ * package: #19 - styled-components ํจํค์ง ์ค์น * package: #19 - styled-components SSR babel ์ค์ * add: #19 styled-components๋ฅผ ์ํ _document.tsx ํ์ผ ์ถ๊ฐ * package: #19 - styled-components babel ์ค์ ์ ์ํ ํจํค์ง ์ค์น * add: #19 ์ ์์๋ ํ์ธ ์ฝ๋ ์์ฑ * fix: babelrc ํ์ผ ์ฝ๋์ ๋ฆฌ * add: #26 - Representative Layout ์์ฑ ๋ฐ ํ ์คํธ ์์ฑ * del: ํ ์คํธ ์ฝ๋ ์ญ์ * add: #26 - Represantative Layout ์ธ๋ถ ๋ด์ฉ ์ถ๊ฐ ์์ฑ ๋ฐ ํ ์คํธ ์ฝ๋ ์์ ๊ณต์ฉ ๋ ์ด์์์ ์ฌ์ฉ๋๋ ๋ ์ด์์ ์ปดํฌ๋ํธ ์์ฑ * add: ๊ณต์ฉ์คํ์ผ ์ถ๊ฐ ์ ์ฉ * add: #22 - MainTitle ์คํ์ผ ์ถ๊ฐ * fix: ์ฝ๋ ์ ๋ฆฌ * rename: RepresentativeLayout์ HeaderBackground ์ด๋ฆ ์์ , MainTitle => PageTitle ๋ก ์์ * up: ์คํ์ผ ์์ * up: ๊ธ๋ก๋ฒ , HeaderBackground ์คํ์ผ ๋ณ๊ฒฝ * up: global style ๋ณ๊ฒฝ * add: #30 - ์๋ฆผ ์ปดํฌ๋ํธ ์ ์ ๊ธฐ๋ฅ์ ๋์ํ์ง ์์ ํ๋กํ ํ์ ์ดํ ์ ๋ฐ์ดํธ๋ก ๊ธฐ๋ฅ ์ถ๊ฐ * add: #25 - ์ค๋ ํ ์ผ ํ์ด์ง ๋ ์ด์์์ ์ํ ๋ํ ๋ ์ด์์์ ๊ณต๊ฐ ์์ฑ * style: ์ฝ๋ ์คํ์ผ ์๋ ์์ * add: #25 - ์ค๋ ํ ์ผ ํ์ด์ง ๋ ์ด์์์ ์น์ ๋ณ ์คํ์ผ ์ง์ * refactor: ํ์ผ๊ณผ ๋ณ์ ์ด๋ฆ์ ๋ฐ๊ฟ layout ์ปดํฌ๋ํธ์ ๊ฐ๊ฐ์ ์ปดํฌ๋ํธ๋ค์ด ๋ด๊ธฐ๋ ๊ณต๊ฐ์ Section์ด๋ผ๋ ์ด๋ฆ์ผ๋ก ํต์ผ * add: #23 ์๋ ์ฌ๊ธฐ ์ปดํฌ๋ํธ ์คํ์ผ ์ถ๊ฐ * package: ์๋ฒ์์ ๋น๋๊ธฐ ํต์ ์ ์ํ axios ํจํค์ง ์ค์น * add: #23 ์๋์ฌ๊ธฐ ์ปดํฌ๋ํธ ์ ์ ์๋ฃ * up: layout ๋ณ๊ฒฝ * del: ์ด์ ์ ๋ง๋ค์๋ mock ํ์ผ ์ญ์ * add: #24 - ํ ์ผ ๋ชฉ๋ก ๋ฆฌ์คํธ ์คํ์ผ ์ ์ * add: test์ฉ json ํ์ผ ์ถ๊ฐ * up: style ์์ * add: #24 - TodoItem์ฉ ํ์ ์ถ๊ฐ * up: ํ ์คํธ์ฉ ๋ฐ์ดํฐ ์ฌ์ฉ์ ์ํ์ฌ ์์ ๊ธฐ์กด์๋ ๋ก์ปฌ mock ์๋ฒ๋ฅผ ํตํ์ฌ ์ํํ์์ง๋ง ํ์ฌ ์๋ฒ์ ์ฌ๋ ธ์ ๊ฒฝ์ฐ ์คํ๋์ง ์๊ธฐ ๋๋ฌธ์ ์์๋ก jsonํ์ผ์ ์ฝ๋๋ก ์์ * refector: ๋ณ์๋ช ์์ ๋ฐ ์ค๋ฐ๊ฟ ์์ * add: #24 - ์ค๋ ํ ์ผ ๋ชฉ๋ก์ ๊ฐ์ ธ์ค๋ axios ์ฝ๋์ ์ํ ์ฝ๋ ์์ฑ * add: #24 - ์ค๋ ํ ์ผ ๋ชฉ๋ก์ ๋ณด์ฌ์ฃผ๋ ์ปดํฌ๋ํธ ์์ฑ * add: #24 - ํด๋ฆญ์ ๋ํ ํ ์์ฑ * add: #24 - ๋ ์ด์์์ ์ค๋ ํ ์ผ ๋ชฉ๋ก์ด ๋์ค๋ ์ปดํฌ๋ํธ ์ถ๊ฐ * add: #24 - ์ค๋ ํ ์ผ์ ๋ํ ๋ ธ๋ ์ปดํฌ๋ํธ ์ ์ * refactor: ํจ์ ๋ช ๋ณ๊ฒฝ * add: #32 svg ์์ด์ฝ์ ํ์ ๊ณผ ๊ฐ๊ฐ์ ์์ด์ฝ์ ์ ์ฅํ๋ static ํด๋ ์์ฑ * rename utils์์ libs๋ก ๋ณ๊ฒฝ * refactor: urils ์์ libs๋ก ์์ * style: ๋ฐ์๋์ง ์์ prettier ์ ์ฉ * up: ์๋ฉด์ผ๋ก ์งํ๋ ํผ๋๋ฐฑ ๋ฐ์ * #32 theme์ ์ฉ์ ์ํ ์ฝ๋ ์์ฑ * up: ํ๋น์ฝ ์์ด์ฝ Belf๋ก ๋ณ๊ฒฝ * refactor: recoil ๋ค์ด๋ฐ ์ปจ๋ฒค์ ์ ๋ง์ถฐ ํจ์๋ช ์์ * refactor: ์ ์ญ ์คํ์ผ ์ด์ธ์ ์คํ์ผ์ ์ปดํฌ๋ํธ ๋ด๋ถ์ ๋ฃ์ * refactor: ์์ * refactor: layout ๋๋ ํฐ๋ฆฌ Components ๋๋ ํ ๋ฆฌ ๋ฐ์ผ๋ก ๋บ * refactor: Assets ํด๋๋ฅผ ๋ง๋ค์ด Icons ํด๋๋ฅผ ๋ฃ์ด์ค * refactor: Assets => assets * refactor: ์ฌ์ฉํ์ง ์๋ ์ฝ๋ ์ญ์ * refactor: ๋ ์ด์์ ์์กด์ฑ์ด ์๋๋ก ์์ * refactor: recoil ์ ์ธ ๋ฐฉ์ ์์ * refactor: asset ์ด๋ฆ ์์ 1 * refactor: asset ์ด๋ฆ ์์ 1 * refactor: asset ์ด๋ฆ ์์ 1 Co-authored-by: Kyungeun <[email protected]> Co-authored-by: Kyungeun <[email protected]> Co-authored-by: Kyungeun Park <[email protected]> Co-authored-by: JP3Pe <[email protected]>
- Loading branch information
1 parent
6023cfe
commit 5dc8e7c
Showing
51 changed files
with
2,095 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{ | ||
"presets": ["next/babel"] | ||
"presets": ["next/babel"], | ||
"plugins": [ | ||
[ | ||
"styled-components", | ||
{ | ||
"ssr": true, | ||
"displayName": true | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Icon } from "../../libs/type/Icon"; | ||
|
||
const bigCheck: Icon = { | ||
d: | ||
"M15.45,9.32a4.61,4.61,0,0,0-.22-.51L11.78,2.12a3.59,3.59,0,0,0-6.55,0L1.78,8.81a4.67,4.67,0,0,0-.23.51A2.49,2.49,0,0,0,0,11.7v1.39a2.37,2.37,0,0,0,2.23,2.49h3.7C5.93,16.36,7.08,17,8.5,17a3.8,3.8,0,0,0,2.08-.58,1,1,0,0,0,.49-.84h3.7A2.37,2.37,0,0,0,17,13.09V11.7A2.49,2.49,0,0,0,15.45,9.32Z", | ||
width: 17, | ||
height: 17, | ||
fill: "#ffffff", | ||
}; | ||
|
||
export default bigCheck; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Icon } from "../../libs/type/Icon"; | ||
|
||
const bigCheck: Icon = { | ||
d: | ||
"M9.79,22.23.75,13a2.63,2.63,0,0,1,0-3.68,2.53,2.53,0,0,1,3.57,0l0,0,7.42,7.56L27.64.76a2.51,2.51,0,0,1,3.56,0l.05,0a2.63,2.63,0,0,1,0,3.68L13.77,22.24a2.49,2.49,0,0,1-2,.75h-.19A2.5,2.5,0,0,1,9.79,22.23Z", | ||
width: 32, | ||
height: 23, | ||
fill: "#29A4FF", | ||
}; | ||
|
||
export default bigCheck; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Icon } from "../../libs/type/Icon"; | ||
|
||
const bigDelete: Icon = { | ||
d: | ||
"M18.67,22.26,11.5,15.09,4.33,22.26A2.54,2.54,0,1,1,.74,18.67h0L7.91,11.5.74,4.33A2.54,2.54,0,0,1,.74.74h0a2.54,2.54,0,0,1,3.59,0L11.5,7.91,18.67.74a2.54,2.54,0,0,1,3.59,0h0a2.54,2.54,0,0,1,0,3.59L15.09,11.5l7.17,7.17a2.54,2.54,0,0,1,0,3.59,2.55,2.55,0,0,1-3.59,0Z", | ||
width: 23, | ||
height: 23, | ||
fill: "#FF587E", | ||
viewBox: "0 0 23 23", | ||
}; | ||
|
||
export default bigDelete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import bell from "../../assets/icons/bell"; | ||
|
||
import { default as S } from "./style"; | ||
|
||
function NotificationButton(): JSX.Element { | ||
return ( | ||
<S.Frame> | ||
<S.Display /> | ||
<S.Icon {...bell}> | ||
<path d={bell.d} /> | ||
</S.Icon> | ||
</S.Frame> | ||
); | ||
} | ||
|
||
export default NotificationButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import styled from "styled-components"; | ||
import Icon from "../../styles/Icon"; | ||
|
||
const Display = styled.div` | ||
background-color: #ff924a; | ||
border-radius: 50%; | ||
width: 8px; | ||
height: 8px; | ||
position: absolute; | ||
transform: translate(0%, -50%); | ||
left: 19px; | ||
top: 13px; | ||
z-index: 1; | ||
`; | ||
|
||
const Frame = styled.div` | ||
background-color: rgba(255, 255, 255, 0.45); | ||
border-radius: 10px; | ||
width: 36px; | ||
height: 36px; | ||
position: absolute; | ||
display: inline-block; | ||
right: 0; | ||
transform: translateY(-50%); | ||
top: 50%; | ||
`; | ||
|
||
const style = { | ||
Frame: Frame, | ||
Icon: Icon, | ||
Display: Display, | ||
}; | ||
|
||
export default style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { default as S } from "./style"; | ||
|
||
type props = { | ||
titleText: string; | ||
}; | ||
|
||
function PageTitle({ titleText }: props): JSX.Element { | ||
return <S.Title>{titleText}</S.Title>; | ||
} | ||
|
||
export default PageTitle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import styled from "styled-components"; | ||
|
||
const Title = styled.a` | ||
font-size: 30px; | ||
font-weight: bold; | ||
color: white; | ||
`; | ||
|
||
const style = { | ||
Title: Title, | ||
}; | ||
|
||
export default style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { useRecoilValue } from "recoil"; | ||
|
||
import { getCountAvgSelector, getPlatingGlass2dArraySelector } from "../../states/plantingGlass"; | ||
|
||
import { default as S } from "./style"; | ||
|
||
import { Glass } from "../../libs/type/PlantingGlass"; | ||
|
||
function colorGenerator(avg: number, value: number): string { | ||
if (value === 0) { | ||
return "#EBEDF0"; | ||
} else if (value <= avg / 2) { | ||
return "#FFEDE2"; | ||
} else if (value <= avg) { | ||
return "#FFD0B1"; | ||
} else if (value <= avg + avg / 2) { | ||
return "#FF9E5F"; | ||
} else { | ||
return "#FF8433"; | ||
} | ||
} | ||
|
||
function Component(): JSX.Element { | ||
const array = useRecoilValue(getPlatingGlass2dArraySelector); | ||
const avg = useRecoilValue(getCountAvgSelector); | ||
|
||
return ( | ||
<S.Card> | ||
<S.Grid> | ||
{array.map((e: Glass[], i: number) => ( | ||
<S.WeekItem key={"i_" + i}> | ||
<S.WeekGrid key={"g_" + i}> | ||
{e.map((item: Glass, j: number) => ( | ||
<S.DayItem key={i + "-" + j} color={colorGenerator(avg, item.count)} id={item.date} /> | ||
))} | ||
</S.WeekGrid> | ||
</S.WeekItem> | ||
))} | ||
</S.Grid> | ||
</S.Card> | ||
); | ||
} | ||
export default Component; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { useRecoilValueLoadable } from "recoil"; | ||
|
||
import { getPlantingGlassSelector } from "../../states/plantingGlass"; | ||
|
||
import Component from "./Component"; | ||
|
||
function PlantingGlass(): JSX.Element { | ||
const con = useRecoilValueLoadable(getPlantingGlassSelector); | ||
|
||
switch (con.state) { | ||
case "hasValue": | ||
return <Component />; | ||
case "loading": | ||
return <>loading...</>; | ||
case "hasError": | ||
return <>error...</>; | ||
} | ||
} | ||
|
||
export default PlantingGlass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import styled, { css } from "styled-components"; | ||
|
||
const Card = styled.div` | ||
background-color: white; | ||
padding: 3% 4%; | ||
box-sizing: border-box; | ||
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3); | ||
border-radius: 10px; | ||
height: 110px; | ||
`; | ||
|
||
const DayItem = styled.div<{ color: string }>` | ||
display: flex; | ||
justify-content: center; | ||
${(props) => { | ||
if (props.color == "#EBEDF0") { | ||
return css` | ||
background-color: ${props.color}; | ||
border: solid 1px #e0e2e6; | ||
`; | ||
} else { | ||
return css` | ||
background-color: ${props.color}; | ||
`; | ||
} | ||
}} | ||
border-radius: 3px; | ||
`; | ||
|
||
const Grid = styled.div` | ||
display: grid; | ||
grid-template-columns: repeat(24, 3%); | ||
grid-gap: 1.215%; | ||
`; | ||
|
||
const WeekGrid = styled.div` | ||
display: grid; | ||
grid-template-columns: 10px; | ||
grid-template-rows: repeat(7, 10px); | ||
grid-gap: 4px; | ||
`; | ||
|
||
const WeekItem = styled.div` | ||
display: flex; | ||
`; | ||
|
||
const style = { | ||
Card: Card, | ||
Grid: Grid, | ||
WeekGrid: WeekGrid, | ||
WeekItem: WeekItem, | ||
DayItem: DayItem, | ||
}; | ||
|
||
export default style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { useState } from "react"; | ||
|
||
import useClick from "../../hooks/useClick"; | ||
|
||
import bigCheck from "../../assets/icons/bigCheck"; | ||
import bigDelete from "../../assets/icons/bigDelete"; | ||
|
||
import { default as S } from "./style"; | ||
|
||
import { TodoItem } from "../../libs/type/TodoTodayItem/indes"; | ||
|
||
type props = { | ||
todoItem: TodoItem; | ||
}; | ||
|
||
function TodayTodoItem({ todoItem }: props): JSX.Element { | ||
const [itemLeft, setItemLeft] = useState<number>(0); | ||
|
||
const refClickComponent = useClick(() => { | ||
if (itemLeft === 0) { | ||
setItemLeft(-120); | ||
} else { | ||
setItemLeft(0); | ||
} | ||
}); | ||
|
||
return ( | ||
<S.TodoItemSection> | ||
<S.TodoItemCard ref={refClickComponent} left={itemLeft}> | ||
<S.TodoTitleSection> | ||
<S.CourseColor bgColor={todoItem.color} /> | ||
<S.TodoTitle>{todoItem.reminder_title}</S.TodoTitle> | ||
</S.TodoTitleSection> | ||
<S.CourseTitle>{todoItem.course_title}</S.CourseTitle> | ||
</S.TodoItemCard> | ||
<S.ButtonSection> | ||
<S.EventButton> | ||
<S.Icon {...bigCheck}> | ||
<path d={bigCheck.d} /> | ||
</S.Icon> | ||
</S.EventButton> | ||
<S.EventButton> | ||
<S.Icon {...bigDelete}> | ||
<path d={bigDelete.d} /> | ||
</S.Icon> | ||
</S.EventButton> | ||
</S.ButtonSection> | ||
</S.TodoItemSection> | ||
); | ||
} | ||
|
||
export default TodayTodoItem; |
Oops, something went wrong.