-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feature/session-time-table
- Loading branch information
Showing
17 changed files
with
701 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import axios from '@/lib/axios'; | ||
import { SessionList } from '@/@types/session'; | ||
import { SessionDetail, SessionList } from '@/@types/session'; | ||
|
||
export async function getSessionList(): Promise<SessionList[]> { | ||
const response = await axios.get(`/sessions/`); | ||
return response.data; | ||
} | ||
|
||
export async function getSessionDetail( | ||
sessionId: string | ||
): Promise<SessionDetail> { | ||
const response = await axios.get<SessionDetail>(`/sessions/${sessionId}/`); | ||
const { brief, desc, comment, ...data } = response.data; | ||
return data; | ||
} |
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,30 @@ | ||
import { SessionDetail } from '@/@types/session'; | ||
import { DIFFICULTY, DURATION, LANGUAGE } from '@/constants/session'; | ||
import { styled } from '@/stitches.config'; | ||
|
||
const Wrapper = styled('div', { | ||
marginTop: '8px', | ||
}); | ||
|
||
interface Props { | ||
info: Pick< | ||
SessionDetail, | ||
'category_name' | 'difficulty' | 'duration' | 'language' | 'room_num' | ||
>; | ||
} | ||
|
||
export const SessionBasicInfo = ({ info }: Props) => { | ||
return ( | ||
<Wrapper> | ||
카테고리 : {info.category_name} | ||
<br /> | ||
난이도 : {DIFFICULTY[info.difficulty]} | ||
<br /> | ||
발표 시간 : {DURATION[info.duration]} | ||
<br /> | ||
언어 : {LANGUAGE[info.language]} | ||
<br /> | ||
발표 장소 : {`${info.room_num}호`} | ||
</Wrapper> | ||
); | ||
}; |
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,41 @@ | ||
import { User } from '@/@types/session'; | ||
import * as P from '@/components/session/styles'; | ||
import Image from 'next/image'; | ||
import { H4 } from '../heading'; | ||
import { styled } from '@/stitches.config'; | ||
|
||
export const SpeakerContainer = styled('div', { | ||
display: 'block', | ||
marginTop: '16px', | ||
'@bp2': { | ||
display: 'flex', | ||
gap: '20px', | ||
}, | ||
}); | ||
|
||
export const ImageContainer = styled('div', { | ||
position: 'relative', | ||
aspectRatio: '1/1', | ||
'@bp2': { | ||
height: '200px', | ||
}, | ||
}); | ||
|
||
export const SpeakerInfo = ({ user }: { user: User }) => { | ||
return ( | ||
<SpeakerContainer> | ||
<ImageContainer> | ||
<Image | ||
src={user.profile_img || '/images/Logo.png'} | ||
fill | ||
style={{ objectFit: 'cover', borderRadius: '50%' }} | ||
alt={user.nickname} | ||
/> | ||
</ImageContainer> | ||
<div> | ||
<H4>{user.nickname}</H4> | ||
<P.DescContainer>{user.bio}</P.DescContainer> | ||
</div> | ||
</SpeakerContainer> | ||
); | ||
}; |
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,31 @@ | ||
import { styled } from '@/stitches.config'; | ||
|
||
export const Section = styled('section', { | ||
borderBottom: '2px solid $textPrimary', | ||
|
||
'&:last-child': { | ||
borderBottom: '2px solid transparent', | ||
}, | ||
|
||
'@bp1': { | ||
padding: '1.2rem 1.2rem', | ||
}, | ||
'@bp2': { | ||
padding: '4rem 4rem', | ||
}, | ||
}); | ||
|
||
export const PageContainer = styled('div', { | ||
bodyText: 1, | ||
}); | ||
|
||
export const DescContainer = styled('div', { | ||
marginTop: '8px', | ||
wordWrap: 'break-word', | ||
wordBreak: 'keep-all', | ||
whiteSpace: 'pre-line', | ||
}); | ||
|
||
export const IntroContainer = styled(DescContainer, {}); | ||
|
||
export const Block = styled('div', {}); |
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
Oops, something went wrong.