-
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 #91 from prgrms-web-devcourse/refactor/common/cour…
…ts-action-buttons ♻️ refactor: 공유, 채팅, 즐겨찾기, 지도 버튼 domain 공통 컴포넌트로 분리
- Loading branch information
Showing
29 changed files
with
512 additions
and
165 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
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
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
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
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ interface Props { | |
color?: string; | ||
mark?: boolean; | ||
code?: boolean; | ||
|
||
[x: string]: any; | ||
} | ||
|
||
|
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 * as S from "./style"; | ||
|
||
const Address: React.FC = ({ children }) => { | ||
return ( | ||
<S.SubHeaderArea> | ||
<S.AddressText>{children}</S.AddressText> | ||
</S.SubHeaderArea> | ||
); | ||
}; | ||
|
||
export default Address; |
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,17 @@ | ||
import Link from "next/link"; | ||
|
||
import { IconButton } from "@components/base"; | ||
|
||
interface Props { | ||
courtId: number; | ||
} | ||
|
||
const ChatButton: React.FC<Props> = ({ courtId }) => { | ||
return ( | ||
<Link href={`/chat/courts/${courtId}`} passHref> | ||
<IconButton name="message-square" /> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default ChatButton; |
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,39 @@ | ||
import { useMemo } from "react"; | ||
|
||
import { Spacer, Text } from "@components/base"; | ||
import * as S from "./style"; | ||
|
||
const weekdays = ["일", "월", "화", "수", "목", "금", "토"] as const; | ||
|
||
interface Props { | ||
startDatetime: string; | ||
endDatetime: string; | ||
} | ||
|
||
const Datetime: React.FC<Props> = ({ startDatetime, endDatetime }) => { | ||
const startDate = useMemo(() => new Date(startDatetime), [startDatetime]); | ||
const endDate = useMemo(() => new Date(endDatetime), [endDatetime]); | ||
return ( | ||
<S.SubHeaderArea> | ||
<Spacer gap="xxs" type="vertical"> | ||
<Text strong> | ||
{startDate.getFullYear()}년{" "} | ||
{(startDate.getMonth() + 1).toString().padStart(2, "0")}월{" "} | ||
{startDate.getDate().toString().padStart(2, "0")}일 ( | ||
<S.DayOfTheWeek index={startDate.getDay()}> | ||
{weekdays[startDate.getDay()]} | ||
</S.DayOfTheWeek> | ||
) | ||
</Text> | ||
<Text strong> | ||
{startDate.getHours().toString().padStart(2, "0")}: | ||
{startDate.getMinutes().toString().padStart(2, "0")} -{" "} | ||
{endDate.getHours().toString().padStart(2, "0")}: | ||
{endDate.getMinutes().toString().padStart(2, "0")} | ||
</Text> | ||
</Spacer> | ||
</S.SubHeaderArea> | ||
); | ||
}; | ||
|
||
export default Datetime; |
Oops, something went wrong.