-
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.
Merge branch 'dev' into feat/#40-mypage
- Loading branch information
Showing
108 changed files
with
4,250 additions
and
631 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
* text eol=lf | ||
*.ts text eol=lf | ||
*.tsx text eol=lf | ||
*.js text eol=lf | ||
*.jsx text eol=lf | ||
*.json text eol=lf | ||
|
||
*.png -text | ||
*.jpg -text | ||
*.gif -text |
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 @@ | ||
name: Vercel Production Deployment | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
EXPO_PUBLIC_SERVER_URL: ${{ secrets.EXPO_PUBLIC_SERVER_URL }} | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
Deploy-Production: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Install Project Dependencies | ||
run: yarn install | ||
- name: Build Project Artifacts | ||
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |
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,65 @@ | ||
import { Feather } from '@expo/vector-icons'; | ||
import { useLocalSearchParams, 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 { PROJECT_URLS } from '@/constants'; | ||
import { color } from '@/styles/theme'; | ||
|
||
function Page() { | ||
const router = useRouter(); | ||
const { id } = useLocalSearchParams<{ id: string }>(); | ||
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_URLS.PROJECT_CREATE)}> | ||
<Typography | ||
variant='Body1/Normal' | ||
fontWeight='medium' | ||
color={color.Label.Alternative}> | ||
편집 | ||
</Typography> | ||
</Pressable> | ||
) : null, | ||
}); | ||
}, [data.name, navigation, router]); | ||
|
||
if (!id) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<ProjectDetail | ||
id={id} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Feather } from '@expo/vector-icons'; | ||
import { Stack, useRouter } from 'expo-router'; | ||
import { Pressable } from 'react-native'; | ||
|
||
import { PROJECT_URLS, REVIEW_NAVIGATIONS } from '@/constants'; | ||
import { color } from '@/styles/theme'; | ||
|
||
function Layout() { | ||
const router = useRouter(); | ||
return ( | ||
<Stack | ||
screenOptions={() => ({ | ||
headerStyle: { height: 40, backgroundColor: color.Background.Normal }, | ||
headerTitleStyle: { | ||
paddingTop: 12, | ||
fontFamily: 'Pretendard-Bold', | ||
}, | ||
headerTitleAlign: 'center', | ||
headerShadowVisible: false, | ||
})}> | ||
<Stack.Screen | ||
name={REVIEW_NAVIGATIONS.CREATE} | ||
options={{ | ||
title: '나의 설문지', | ||
headerLeft: ({ canGoBack }) => ( | ||
<Pressable | ||
onPress={() => (canGoBack ? router.back() : router.push(PROJECT_URLS.PROJECT_HOME))}> | ||
<Feather | ||
name='chevron-left' | ||
size={24} | ||
/> | ||
</Pressable> | ||
), | ||
}} | ||
/> | ||
</Stack> | ||
); | ||
} | ||
|
||
export default Layout; |
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,93 @@ | ||
import styled from '@emotion/native'; | ||
import { useCallback, useState } from 'react'; | ||
|
||
import SolidButton from '@/components/common/button/SolidButton'; | ||
import Typography from '@/components/common/typography'; | ||
import SelectCategoryChipList from '@/components/questionnaire/SelectCategoryChipList'; | ||
import { useTabBarEffect } from '@/hooks'; | ||
import { flexDirectionColumn } from '@/styles/common'; | ||
|
||
const MINIMUM_CATEGORY_COUNT = 5; | ||
|
||
function Review() { | ||
useTabBarEffect(); | ||
// const { id } = useLocalSearchParams<{ id: string }>(); | ||
|
||
const [error, setError] = useState<string | null>(null); | ||
const [selectedCategoryList, setSelectedCategoryList] = useState<string[]>([]); | ||
|
||
const addCategory = (category: string) => { | ||
if (error) { | ||
setError(null); | ||
} | ||
setSelectedCategoryList([...selectedCategoryList, category]); | ||
}; | ||
const removeCategory = (category: string) => | ||
setSelectedCategoryList(selectedCategoryList.filter((item) => item !== category)); | ||
|
||
const selectCategory = useCallback(() => { | ||
if (selectedCategoryList.length < MINIMUM_CATEGORY_COUNT) { | ||
setError('5개를 선택해주세요'); | ||
return; | ||
} | ||
setError(null); | ||
}, [selectedCategoryList]); | ||
|
||
return ( | ||
<S.Container> | ||
<S.WrapperBox> | ||
<S.ReviewTitle> | ||
<S.TitleText | ||
variant='Title3' | ||
fontWeight='bold'> | ||
받고 싶은 리뷰의{`\n`}카테고리 5개를 골라주세요 | ||
</S.TitleText> | ||
<S.SubTitleText | ||
variant='Label1/Normal' | ||
fontWeight='medium'> | ||
카테고리 별로 설문이 구성돼요 | ||
</S.SubTitleText> | ||
</S.ReviewTitle> | ||
|
||
<SelectCategoryChipList | ||
item={selectedCategoryList} | ||
addItem={addCategory} | ||
removeItem={removeCategory} | ||
error={error} | ||
/> | ||
</S.WrapperBox> | ||
|
||
<SolidButton | ||
onPress={selectCategory} | ||
full> | ||
다음 | ||
</SolidButton> | ||
</S.Container> | ||
); | ||
} | ||
|
||
const S = { | ||
Container: styled.SafeAreaView` | ||
flex: 1; | ||
gap: 32px; | ||
justify-content: space-between; | ||
padding: 33px 20px 52px; | ||
background: ${({ theme }) => theme.color.Background.Normal}; | ||
`, | ||
WrapperBox: styled.View` | ||
${flexDirectionColumn}; | ||
gap: 32px; | ||
`, | ||
ReviewTitle: styled.View` | ||
${flexDirectionColumn}; | ||
gap: 8px; | ||
`, | ||
TitleText: styled(Typography)` | ||
color: ${({ theme }) => theme.color.Label.Normal}; | ||
`, | ||
SubTitleText: styled(Typography)` | ||
color: ${({ theme }) => theme.color.Label.Alternative}; | ||
`, | ||
}; | ||
|
||
export default Review; |
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.