-
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 branch 'Weekly' into Feat/issue-#33
- Loading branch information
Showing
19 changed files
with
584 additions
and
0 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions
58
src/pages/siniddo/call-back/detail/components/guide-line-list/guide-line-button.tsx
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,58 @@ | ||
import { useNavigate, useLocation } from 'react-router-dom'; | ||
|
||
import ArrowImg from '../../assets/arrow-outline.png'; | ||
import { Button, Image } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
|
||
type Props = { | ||
title: string; | ||
id: string; | ||
backgroundColor: string; | ||
}; | ||
|
||
export const GuideLineButton = ({ title, backgroundColor, id }: Props) => { | ||
const navigate = useNavigate(); | ||
const location = useLocation(); | ||
|
||
const handleClick = () => { | ||
navigate(`${location.pathname}/${id}`); | ||
}; | ||
|
||
return ( | ||
<Wrapper backgroundColor={backgroundColor} onClick={handleClick}> | ||
<Content> | ||
<Title>{title}</Title> | ||
<ArrowIcon src={ArrowImg} /> | ||
</Content> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled(Button)` | ||
width: 100%; | ||
height: 70px; | ||
border-radius: 10px; | ||
background-color: ${(props) => | ||
props.backgroundColor ? props.backgroundColor : '#81b6ff'}; | ||
outline: 0; | ||
padding: 0; | ||
margin-bottom: 10px; | ||
`; | ||
|
||
const Content = styled.div` | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 0 30px; | ||
`; | ||
|
||
const Title = styled.h2` | ||
font-size: var(--font-size-xl); | ||
font-weight: 500; | ||
color: var(--color-white); | ||
`; | ||
|
||
const ArrowIcon = styled(Image)` | ||
margin-left: auto; | ||
`; |
24 changes: 24 additions & 0 deletions
24
src/pages/siniddo/call-back/detail/components/guide-line-list/index.tsx
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,24 @@ | ||
import { GUIDE_LINE_CATEGORIES } from '../../data/guide-line'; | ||
import { GuideLineButton } from './guide-line-button'; | ||
import styled from '@emotion/styled'; | ||
|
||
export const GuideLineList = () => { | ||
return ( | ||
<Wrapper> | ||
{GUIDE_LINE_CATEGORIES.map((data) => ( | ||
<GuideLineButton | ||
key={data.id} | ||
title={data.title} | ||
id={data.id} | ||
backgroundColor={data.backgroundColor} | ||
/> | ||
))} | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div` | ||
width: 100%; | ||
margin-top: 50px; | ||
margin-bottom: 30px; | ||
`; |
63 changes: 63 additions & 0 deletions
63
src/pages/siniddo/call-back/detail/components/menu/post-accept/index.tsx
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,63 @@ | ||
import { BasicButton } from '@/shared/components/common/button'; | ||
import styled from '@emotion/styled'; | ||
|
||
type Props = { | ||
handleComplete: () => void; | ||
handleCancle: () => void; | ||
phoneNumber: string; | ||
}; | ||
|
||
export const PostAcceptMenu = ({ | ||
handleComplete, | ||
handleCancle, | ||
phoneNumber, | ||
}: Props) => { | ||
return ( | ||
<Wrapper> | ||
<BasicButton onClick={handleComplete}>λμ μλ£</BasicButton> | ||
<Space /> | ||
<BasicButton onClick={handleCancle} themeType='outline'> | ||
λμ ν¬κΈ° | ||
</BasicButton> | ||
<ContectSection> | ||
<Title>μλμ΄ μ νλ²νΈ</Title> | ||
<Content>{phoneNumber}</Content> | ||
</ContectSection> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div` | ||
width: 100%; | ||
margin-top: 30px; | ||
`; | ||
|
||
const Space = styled.div` | ||
width: 100%; | ||
height: 10px; | ||
`; | ||
|
||
const ContectSection = styled.div` | ||
margin-top: 30px; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
`; | ||
|
||
const Title = styled.div` | ||
width: 200px; | ||
padding: 5px; | ||
border-radius: 5px; | ||
background-color: #f6e4e4; | ||
font-size: var(--font-size-md); | ||
font-weight: 400; | ||
color: #c69090; | ||
text-align: center; | ||
`; | ||
|
||
const Content = styled.p` | ||
font-size: var(--font-size-xxl); | ||
font-weight: 700; | ||
margin-top: 10px; | ||
`; |
19 changes: 19 additions & 0 deletions
19
src/pages/siniddo/call-back/detail/components/menu/pre-accept/index.tsx
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,19 @@ | ||
import { BasicButton } from '@/shared/components/common/button'; | ||
import styled from '@emotion/styled'; | ||
|
||
type Props = { | ||
handleClcik: () => void; | ||
}; | ||
|
||
export const PreAcceptMenu = ({ handleClcik }: Props) => { | ||
return ( | ||
<Wrapper> | ||
<BasicButton onClick={handleClcik}>μ νκ±ΈκΈ° λ° μλ½νκΈ°</BasicButton> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div` | ||
width: 100%; | ||
margin-top: 30px; | ||
`; |
22 changes: 22 additions & 0 deletions
22
src/pages/siniddo/call-back/detail/data/guide-line/index.ts
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,22 @@ | ||
export const GUIDE_LINE_CATEGORIES = [ | ||
{ | ||
title: 'νμ νΈμΆνκΈ°', | ||
id: 'taxi', | ||
backgroundColor: '#81b6ff', | ||
}, | ||
{ | ||
title: 'λλΌλ§ λ°©μμκ° μλ €μ£ΌκΈ°', | ||
id: 'drama', | ||
backgroundColor: '#b28bff', | ||
}, | ||
{ | ||
title: 'μλ₯ μ μΆ λμμ£ΌκΈ°', | ||
id: 'document', | ||
backgroundColor: '#ffa7b5', | ||
}, | ||
{ | ||
title: 'λμ€κ΅ν΅ μ΄λ λμμ£ΌκΈ°', | ||
id: 'document', | ||
backgroundColor: '#ff4d68', | ||
}, | ||
]; |
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,67 @@ | ||
import { useState } from 'react'; | ||
import { useParams, Outlet } from 'react-router-dom'; | ||
|
||
import { GuideLineList } from './components/guide-line-list'; | ||
import { PostAcceptMenu } from './components/menu/post-accept'; | ||
import { PreAcceptMenu } from './components/menu/pre-accept'; | ||
import { Precaution } from '@/shared/components/features/precaution'; | ||
import { Divider } from '@chakra-ui/react'; | ||
import styled from '@emotion/styled'; | ||
|
||
export type CallBackDetailParams = { | ||
callBackId: string; | ||
}; | ||
|
||
const CallBackDetailPage = () => { | ||
const { callBackId = '' } = useParams<CallBackDetailParams>(); | ||
const [accept, setAccept] = useState(false); | ||
|
||
console.log(callBackId); | ||
|
||
const handleRequestAccept = () => { | ||
// λμ μλ½ | ||
setAccept(true); | ||
}; | ||
|
||
const handleComplete = () => { | ||
// λμ μλ£ | ||
}; | ||
|
||
const handleCancle = () => { | ||
// λμ ν¬κΈ° | ||
}; | ||
|
||
return ( | ||
<> | ||
<Wrapper> | ||
<Precaution | ||
category='μμ² κ±°λΆ' | ||
title='κ°μ΄λλΌμΈμ μ νμΈνκ³ μλ½ν΄μ£ΌμΈμ!' | ||
description='μλμ΄μ μμ²μ΄ κ°μ΄λλΌμΈμμ λ²μ΄λ μμ²μΌ κ²½μ° μμ²μ κ±°λΆν μ μμ΅λλ€!' | ||
/> | ||
<GuideLineList /> | ||
<Divider /> | ||
{accept ? ( | ||
<PostAcceptMenu | ||
handleComplete={handleComplete} | ||
handleCancle={handleCancle} | ||
phoneNumber='010-1234-5678' | ||
/> | ||
) : ( | ||
<PreAcceptMenu handleClcik={handleRequestAccept} /> | ||
)} | ||
</Wrapper> | ||
<Outlet /> | ||
</> | ||
); | ||
}; | ||
|
||
export default CallBackDetailPage; | ||
|
||
const Wrapper = styled.div` | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 45px; | ||
`; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions
62
src/pages/siniddo/call-back/list/components/request-row/index.tsx
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,62 @@ | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
import ArrowImg from '../../assets/arrow.png'; | ||
import styled from '@emotion/styled'; | ||
|
||
type Props = { | ||
name: string; | ||
time: number; | ||
id: string; | ||
}; | ||
|
||
export const RequestRow = ({ name, time, id }: Props) => { | ||
const navigate = useNavigate(); | ||
|
||
const handleClick = () => { | ||
navigate(`/call-back/${id}`); | ||
}; | ||
|
||
return ( | ||
<Wrapper onClick={handleClick}> | ||
<Content> | ||
<Title>{name}λμ μμ²</Title> | ||
<Time>{time}λΆ μ </Time> | ||
<ArrowIcon src={ArrowImg} /> | ||
</Content> | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.button` | ||
width: 100%; | ||
height: 60px; | ||
border-radius: 10px; | ||
background-color: var(--color-white-gray); | ||
outline: 0; | ||
margin-bottom: 10px; | ||
`; | ||
|
||
const Content = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
margin: 0 30px; | ||
`; | ||
|
||
const Title = styled.h3` | ||
font-size: var(--font-size-lg); | ||
font-weight: 400; | ||
margin-top: 2px; | ||
`; | ||
|
||
const Time = styled.p` | ||
font-size: var(--font-size-md); | ||
font-weight: 350; | ||
color: var(--color-gray); | ||
margin-left: auto; | ||
`; | ||
|
||
const ArrowIcon = styled.img` | ||
margin-left: 20px; | ||
height: 20px; | ||
`; |
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,5 @@ | ||
export const MOCK_DATA = Array.from({ length: 10 }, () => ({ | ||
name: 'κΉμμ', | ||
time: 50, | ||
id: '1', | ||
})); |
Oops, something went wrong.