-
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.
Merge pull request #2 from FastCampusGroupFE9/ChoiYongJun/mypage-list
Choi yong jun/mypage list
- Loading branch information
Showing
17 changed files
with
408 additions
and
27 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,20 @@ | ||
|
||
declare interface Sample { | ||
declare interface JoinUserInputType { | ||
id: string; | ||
name: string; | ||
joinDate: string; | ||
} | ||
|
||
declare interface LoginOutputType { | ||
id: string; | ||
name: string; | ||
joinDate: string; | ||
accessToken: string; | ||
refreshToken?: string; | ||
} | ||
|
||
declare interface UserLoginType { | ||
accessToken: string; | ||
refreshToken?: string; | ||
} | ||
|
||
// declare 사용하여 전역화 시킨다. |
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,33 @@ | ||
import { useState } from 'react'; | ||
import { DateRange, Range } from 'react-date-range'; | ||
import 'react-date-range/dist/styles.css'; | ||
import 'react-date-range/dist/theme/default.css'; | ||
|
||
export default function MyDateRangePicker() { | ||
const [state, setState] = useState<Range[]>([ | ||
{ | ||
startDate: new Date(), | ||
endDate: undefined, | ||
key: 'selection' | ||
} | ||
]); | ||
|
||
// 선택한 날짜 범위를 받아 옵니다. 확인용 콘솔입니다. | ||
console.log(state[0].startDate); | ||
console.log(state[0].endDate); | ||
|
||
const handleSelect = (ranges: { [key: string]: Range }) => { | ||
setState([ranges['selection']]); | ||
} | ||
|
||
return ( | ||
<DateRange | ||
editableDateInputs={true} | ||
onChange={handleSelect} | ||
moveRangeOnFirstSelection={false} | ||
months={2} | ||
ranges={state} | ||
/> | ||
); | ||
} | ||
|
Oops, something went wrong.