-
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.
- Loading branch information
Showing
12 changed files
with
179 additions
and
43 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {useRecoilState} from 'recoil'; | ||
import useAuthStorage from './useAuthStorage'; | ||
import {authState} from '../../libs/recoil/states/auth'; | ||
|
||
/** 프로젝트 최상단에서 user 데이터 불러오기 */ | ||
export default function useInitialData() { | ||
const {token} = useAuthStorage(); | ||
const [authData, setAuthData] = useRecoilState(authState); | ||
|
||
return {authData, setAuthData, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const enum TokenKeys { | ||
AccessToken = 'AccessToken', | ||
RefreshToken = 'RefreshToken', | ||
Username = 'Username', | ||
} |
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,8 @@ | ||
import {atom} from 'recoil'; | ||
import {AuthStateType} from '../type/auth'; | ||
import {RecoilStateKeys} from '../constants/keys'; | ||
|
||
export const authState = atom<AuthStateType>({ | ||
key: RecoilStateKeys.Auth, | ||
default: {isAuthenticated: false}, | ||
}); |
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,3 @@ | ||
export type AuthStateType = { | ||
isAuthenticated: boolean; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import {StyleSheet} from 'react-native'; | ||
import {theme} from '../../styles'; | ||
import {flexBox} from '../../styles/common'; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
height: '100%', | ||
paddingTop: 63, | ||
}, | ||
title: { | ||
...theme.typography.title_sb_21, | ||
paddingLeft: 24, | ||
marginTop: 30, | ||
}, | ||
subtitle: { | ||
...theme.typography.title_m_16, | ||
color: theme.palette.gray5, | ||
paddingLeft: 24, | ||
marginTop: 10, | ||
width: '80%', | ||
}, | ||
contentContainer: { | ||
flex: 1, | ||
}, | ||
gifContainer: { | ||
width: '100%', | ||
height: 300, | ||
marginTop: 63, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
appleButtonStyle: { | ||
...flexBox('column'), | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
width: '80%', | ||
height: 45, | ||
shadowColor: '#000', | ||
shadowOffset: { | ||
width: 0, | ||
height: 2, | ||
}, | ||
shadowOpacity: 0.1, | ||
shadowRadius: 2, | ||
}, | ||
}); | ||
|
||
export default styles; |
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,9 +1,21 @@ | ||
import React from 'react' | ||
import React from 'react'; | ||
import {Image, Text, View} from 'react-native'; | ||
import styles from './LoginScreen.style'; | ||
import AppleLogin from '../../components/Login/AppleLogin'; | ||
|
||
export default function LoginScreen() { | ||
return ( | ||
<div> | ||
|
||
</div> | ||
) | ||
<View style={styles.container}> | ||
<Text style={styles.title}> | ||
앨범 속 수많은 스크린샷, {'\n'} | ||
이제 스킵에서 빠르게 저장해요 | ||
</Text> | ||
<Text style={styles.subtitle}>벌써 1123개의 명소가 저장되었어요.</Text> | ||
<Image | ||
source={require('../../assets/icon/ic_login.gif')} | ||
style={styles.gifContainer} | ||
/> | ||
<AppleLogin /> | ||
</View> | ||
); | ||
} |