-
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.
[Refactor] [챌린지] 챌린지 전체보기 페이지네이션 리스트 구현 (#112)
* 주석삭제 * 첼린지 상세페이지 일부 구현 및 전체 코드 리팩토링 * snackbar 삭제 * 토스트메세지 위치조정 * 명칭 변경 * 챌린지 프로파일 오류 수정 * 롤백 * fix * headerRightButton 오류 수정 * 전체보기 페이지 구현 * 공유하기 스크린 개선, 챌린지 만들기 후 탭 페이지로 복귀 * feedScreen 자동 invalidateQuery 삭제
- Loading branch information
Showing
33 changed files
with
463 additions
and
388 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 was deleted.
Oops, something went wrong.
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,102 +1,33 @@ | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { Text, View } from 'react-native'; | ||
import React from 'react'; | ||
import { BaseToast, ErrorToast } from 'react-native-toast-message'; | ||
import { Toast } from 'react-native-toast-message/lib/src/Toast'; | ||
import Toast from 'react-native-toast-message'; | ||
import theme from '../../theme/light'; | ||
|
||
const toastConfig = { | ||
/* | ||
Overwrite 'success' type, | ||
by modifying the existing `BaseToast` component | ||
*/ | ||
success: (props) => ( | ||
<BaseToast | ||
{...props} | ||
style={{ borderRadius: 8 }} | ||
contentContainerStyle={{ | ||
backgroundColor: '#121314', | ||
snackbar: (props) => ( | ||
<View | ||
style={{ | ||
width: 343, | ||
height: 60, | ||
borderRadius: 8, | ||
paddingHorizontal: 10, | ||
marginBottom: 48, | ||
marginLeft: 'auto', | ||
marginRight: 'auto', | ||
backgroundColor: `${theme.colors.graphic.black}cc`, | ||
alignContent: 'center', | ||
justifyContent: 'center', | ||
}} | ||
text1Style={{ | ||
fontSize: 15, | ||
fontWeight: '400', | ||
color: 'white', | ||
fontFamily: 'pretendard', | ||
}} | ||
/> | ||
), | ||
/* | ||
Overwrite 'error' type, | ||
by modifying the existing `ErrorToast` component | ||
*/ | ||
error: (props) => ( | ||
<ErrorToast | ||
{...props} | ||
text1Style={{ | ||
fontSize: 17, | ||
}} | ||
text2Style={{ | ||
fontSize: 15, | ||
}} | ||
/> | ||
> | ||
<Text style={{ marginLeft: 15, fontFamily: 'pretendard', fontSize: 14, color: '#FFFFFF' }}> | ||
{props.text1} | ||
</Text> | ||
</View> | ||
), | ||
/* | ||
Or create a completely new type - `tomatoToast`, | ||
building the layout from scratch. | ||
I can consume any custom `props` I want. | ||
They will be passed when calling the `show` method (see below) | ||
*/ | ||
snackbar: ({ text1, props }) => ( | ||
<> | ||
<View | ||
style={{ | ||
width: 343, | ||
height: 60, | ||
borderRadius: 8, | ||
paddingHorizontal: 10, | ||
marginLeft: 'auto', | ||
marginRight: 'auto', | ||
backgroundColor: `${theme.colors.graphic.black}cc`, | ||
alignContent: 'center', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
<Text style={{ marginLeft: 15, fontFamily: 'pretendard', fontSize: 14, color: '#FFFFFF' }}> | ||
{text1} | ||
</Text> | ||
</View> | ||
</> | ||
), | ||
|
||
styles: { | ||
container: { | ||
position: 'absolute', | ||
bottom: 0, | ||
width: '100%', | ||
zIndex: 9999, | ||
elevation: 9999, | ||
padding: 10, | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
}, | ||
text: { | ||
fontSize: 16, | ||
color: 'white', | ||
fontWeight: 'bold', | ||
}, | ||
text1: { | ||
fontSize: 16, | ||
color: 'white', | ||
fontWeight: 'bold', | ||
}, | ||
}, | ||
}; | ||
|
||
const Toasts = () => { | ||
return <Toast config={toastConfig} />; | ||
}; | ||
|
||
export default Toasts; | ||
|
||
const styles = StyleSheet.create({}); |
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
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.