-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: mock 데이터를 변경합니다. * feat: 프로젝트 상세페이지를 추가합니다. * refactor: 스크롤이 있을 경우를 대응하기 위해 grid를 사용한다.
- Loading branch information
Showing
14 changed files
with
433 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Feather } from '@expo/vector-icons'; | ||
import { useNavigation, useRouter } from 'expo-router'; | ||
import { useLayoutEffect } from 'react'; | ||
import { Platform, Pressable } from 'react-native'; | ||
|
||
import { MOCK_PROJECT_DETAIL } from '@/__mock__/project'; | ||
import Typography from '@/components/common/typography'; | ||
import ProjectDetail from '@/components/project/ProjectDetail'; | ||
import { color } from '@/styles/theme'; | ||
|
||
function Page() { | ||
const router = useRouter(); | ||
// const { id } = useLocalSearchParams(); 실제 데이터로 올 경우 해당 id를 이용하여 조회 | ||
const navigation = useNavigation(); | ||
const data = MOCK_PROJECT_DETAIL; | ||
|
||
useLayoutEffect(() => { | ||
navigation.setOptions({ | ||
headerStyle: { | ||
paddingTop: 12, | ||
}, | ||
headerTitle: data.name, | ||
headerTintColor: color.Label.Normal, | ||
headerTitleStyle: { | ||
fontWeight: 600, | ||
fontFamily: 'Pretendard-SemiBold', | ||
fontSize: 18, | ||
lineHeight: 26, | ||
}, | ||
headerLeft: () => ( | ||
<Pressable onPress={router.back}> | ||
<Feather | ||
name='chevron-left' | ||
size={24} | ||
/> | ||
</Pressable> | ||
), | ||
headerRight: () => | ||
Platform.OS !== 'web' ? ( | ||
<Pressable onPress={() => router.push('/project/create')}> | ||
<Typography | ||
variant='Body1/Normal' | ||
fontWeight='medium' | ||
color={color.Label.Alternative}> | ||
편집 | ||
</Typography> | ||
</Pressable> | ||
) : null, | ||
}); | ||
}, [navigation]); | ||
|
||
return <ProjectDetail data={data} />; | ||
} | ||
|
||
export default Page; |
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 @@ | ||
import styled from '@emotion/native'; | ||
|
||
export const Container = styled.SafeAreaView` | ||
padding: 32px 20px 52px; | ||
`; |
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
Oops, something went wrong.