Skip to content

Commit

Permalink
fix: 챌린지 생성 후 에러 & 온보딩 짤림현상 제거 (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
watchiswatch authored Nov 18, 2023
1 parent 6198b44 commit 2ed1cc0
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion src/components/challenge/ChallengeStatusCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const OneWeekRow = ({ order = 1, recordedDates, startDate }: OneWeekRowProps) =>
const targetDate = startDate ? addDaysToDate(startDate, daysAfterStartDate) : '';
const isRecordedDay = recordedDates?.includes(targetDate);
return isRecordedDay ? (
<View style={styles.recordedCircle}>
<View key={index} style={styles.recordedCircle}>
<Text style={{ ...theme.fonts.text.podkova.bold, color: theme.colors.graphic.white }}>
{recordedDates ? recordedDates.indexOf(targetDate) + 1 : 1}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion src/components/texts/HeaderText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function createStyles(theme) {
justifyContent: 'center',
},
header: {
width: '80%',
width: '100%',
marginTop: 4,
fontSize: 26,
fontWeight: '600',
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Main/ChallengesScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const ChallengesScreen = ({ navigation }) => {
insightPerWeek={challengeParticipation?.insightPerWeek ?? 0}
startDate={challengeParticipation?.startDate ?? ''}
endDate={challengeParticipation?.endDate ?? ''}
dayProgresses={userSpecificChallenge?.dayProgresses}
dayProgresses={userSpecificChallenge?.dayProgresses ?? []}
/>
</View>
) : (
Expand Down
12 changes: 6 additions & 6 deletions src/screens/Main/mypage/MyPageScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ const MyPageScreen = ({ navigation, route }) => {
headerRight: () => {
return (
<View style={styles.headerRight}>
<Pressable style={{ marginRight: 12 }} onPress={() => modalRef.current?.present()}>
<SvgXml xml={ShareIconXml} />
<Pressable onPress={() => navigation.navigate('Settings')}>
<SvgXml xml={settingsIcon} />
</Pressable>
<Pressable
style={{ marginHorizontal: 18 }}
onPress={() => navigation.navigate('Settings')}
style={{ marginRight: 18, marginLeft: 15 }}
onPress={() => modalRef.current?.present()}
>
<SvgXml xml={settingsIcon} />
<SvgXml xml={ShareIconXml} />
</Pressable>
</View>
);
Expand Down Expand Up @@ -296,7 +296,7 @@ export default MyPageScreen;
const styles = StyleSheet.create({
headerRight: {
flexDirection: 'row',
justifyContent: 'space-between',
justifyContent: 'flex-end',
alignItems: 'center',
width: 100,
},
Expand Down
16 changes: 8 additions & 8 deletions src/screens/challenge/CategoryCreateScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ const CategoryCreateScreen = ({ navigation, route }) => {

return (
<SafeAreaView style={styles.container}>
<SmallTextInput
inputValue={input}
setInputValue={setInput}
placeholder={'관심사를 입력하세요'}
errorMessage={errorMessage}
/>
<View style={{ paddingTop: 20, paddingHorizontal: 17 }}>
<SmallTextInput
inputValue={input}
setInputValue={setInput}
placeholder={'관심사를 입력하세요'}
errorMessage={errorMessage}
/>
</View>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
paddingHorizontal: 17,
paddingTop: 20,
},
});

Expand Down
43 changes: 24 additions & 19 deletions src/screens/onboarding/ServiceIntroScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,43 @@ const ServiceIntroScreen = ({ navigation }) => {
onSnapToItem={(idx) => handleStep(idx)}
data={[
<>
<Image
source={require('../../../assets/images/onboarding_01.png')}
style={styles.image}
/>
<View key={1} style={styles.carouselItemCtn}>
<HeaderText key={1} header={'기억하고 싶은 콘텐츠, \n지나치지 말고 기록하세요'} />
<View key={1} style={{ paddingTop: 32 }}>
<Image
source={require('../../../assets/images/onboarding_01.png')}
style={styles.image}
/>
<View style={styles.carouselItemCtn}>
<HeaderText header={'기억하고 싶은 콘텐츠, \n지나치지 말고 기록하세요'} />
</View>
</View>
</>,

<>
<Image
source={require('../../../assets/images/onboarding_02.png')}
style={styles.image}
/>
<View key={2} style={styles.carouselItemCtn}>
<HeaderText key={1} header={'꾸준하기 어렵다면, \n친구들과 함께 도전해요'} />
<View key={2} style={{ paddingTop: 32 }}>
<Image
source={require('../../../assets/images/onboarding_02.png')}
style={styles.image}
/>
<View style={styles.carouselItemCtn}>
<HeaderText header={'꾸준하기 어렵다면 \n친구들과 함께 도전해요'} />
</View>
</View>
</>,

<>
<Image
source={require('../../../assets/images/onboarding_03.png')}
style={styles.image}
/>
<View key={3} style={styles.carouselItemCtn}>
<HeaderText key={1} header={'함께할수록 쉬워지는 기록, \n키위가 도와줄게요!'} />
<View key={3} style={{ paddingTop: 32 }}>
<Image
source={require('../../../assets/images/onboarding_03.png')}
style={styles.image}
/>
<View style={styles.carouselItemCtn}>
<HeaderText header={'함께할수록 쉬워지는 기록 \n키위가 도와줄게요!'} />
</View>
</View>
</>,
]}
renderItem={({ item }) => item}
/>
{/* </View> */}
<View style={styles.nextButtonWithStepper}>
<Stepper totalStep={3} currentStep={step + 1} />
<View style={styles.nextButton}>
Expand Down
4 changes: 2 additions & 2 deletions src/utils/api/followList/followersFollowings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const FollowersFollowingsApi = {
try {
if (!searchValue) {
const response = await httpClient.get<FollowersFollowings>(
URL + '?' + `cursor=${getTime()}&limit=30`,
URL + '?' + `cursor=${getTime()}&limit=40`,
{
headers: {
Authorization: `Bearer ${token}`,
Expand All @@ -27,7 +27,7 @@ export const FollowersFollowingsApi = {
return response.data.data;
} else {
const response = await httpClient.get<FollowersFollowings>(
`${URL}/search?searchWord=${searchValue}&limit=20`,
`${URL}/search?searchWord=${searchValue}&limit=30`,
{
headers: {
Authorization: `Bearer ${token}`,
Expand Down

0 comments on commit 2ed1cc0

Please sign in to comment.