Skip to content

Commit

Permalink
Merge branch 'develop' into end
Browse files Browse the repository at this point in the history
  • Loading branch information
nyewon authored Nov 23, 2024
2 parents 98e4741 + e9e0226 commit 7fa605e
Show file tree
Hide file tree
Showing 47 changed files with 1,445 additions and 511 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ yarn-error.*
*.pem

# local env files
.env
.env*.local

# typescript
Expand Down
26 changes: 24 additions & 2 deletions App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useEffect, useState } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { useFonts } from 'expo-font';
import AsyncStorage from '@react-native-async-storage/async-storage'; // AsyncStorage 추가
import BottomTabs from './src/navigation/BottomTabs';
import LoginSignupStack from './src/navigation/stack/LoginSignupStack';
import Splash from './src/screens/Splash';
Expand All @@ -11,10 +13,30 @@ export default function App() {
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [splashVisible, setSplashVisible] = useState(true);

// 폰트 로드
useFonts({
'SpoqaHanSansNeo-Bold': require('./src/assets/fonts/SpoqaHanSansNeo-Bold.ttf'),
'SpoqaHanSansNeo-Medium': require('./src/assets/fonts/SpoqaHanSansNeo-Medium.ttf'),
'SpoqaHanSansNeo-Regular': require('./src/assets/fonts/SpoqaHanSansNeo-Regular.ttf'),
});

useEffect(() => {
const checkAuthStatus = async () => {
// 카카오 로그인 구현 시 수정 (현재는 임시로 true로 설정)
setIsAuthenticated(true);
try {
// AsyncStorage에서 인증 코드 확인
const authCode = await AsyncStorage.getItem('kakaoAuthCode');
console.log('저장된 인증 코드:', authCode);
if (authCode) {
setIsAuthenticated(true); // 인증 코드가 있으면 인증 상태로 설정
} else {
setIsAuthenticated(false); // 인증 코드가 없으면 비인증 상태
}
} catch (error) {
console.error('인증 상태 확인 중 오류:', error);
setIsAuthenticated(false);
} finally {
setSplashVisible(false); // 스플래시 종료
}
};
checkAuthStatus();
}, []);
Expand Down
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,18 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'module:react-native-dotenv',
{
moduleName: '@env',
path: '.env',
blacklist: null,
whitelist: null,
safe: false,
allowUndefined: true,
},
],
],
};
};
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"web": "expo start --web"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-seoul/kakao-login": "^5.4.1",
"@react-navigation/bottom-tabs": "^7.0.4",
"@react-navigation/native": "^7.0.3",
Expand All @@ -17,6 +18,7 @@
"dotenv": "^16.4.5",
"expo": "~52.0.7",
"expo-file-system": "~18.0.3",
"expo-font": "~13.0.1",
"expo-image-picker": "~16.0.2",
"expo-location": "~18.0.2",
"expo-status-bar": "~2.0.0",
Expand All @@ -25,6 +27,7 @@
"react-native": "0.76.2",
"react-native-config": "^1.5.3",
"react-native-geolocation-service": "^5.3.1",
"react-native-dotenv": "^3.4.11",
"react-native-kakao-logins": "^1.4.0",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.1.0",
Expand Down
Binary file added src/assets/fonts/SpoqaHanSansNeo-Bold.ttf
Binary file not shown.
Binary file added src/assets/fonts/SpoqaHanSansNeo-Medium.ttf
Binary file not shown.
Binary file added src/assets/fonts/SpoqaHanSansNeo-Regular.ttf
Binary file not shown.
8 changes: 8 additions & 0 deletions src/assets/icons/iconSvg.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ const warning = `
</svg>
`;

const place_mini = `
<svg width="27" height="34" viewBox="0 0 27 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.57343 22.2438L4.57334 22.2436C2.39519 18.9809 1.4141 16.1674 1.4141 13.7671C1.4141 10.1186 2.59706 7.19926 4.92593 4.89501L4.92599 4.89495C7.2761 2.5694 10.1058 1.4141 13.5 1.4141C16.8942 1.4141 19.7239 2.5694 22.074 4.89495L22.0741 4.89501C24.4029 7.19926 25.5859 10.1185 25.5859 13.7671C25.5859 16.1674 24.6048 18.9809 22.4267 22.2436L22.4266 22.2438C20.4101 25.2651 17.447 28.5538 13.5 32.1083C9.55298 28.5538 6.58991 25.2651 4.57343 22.2438Z" fill="#0080FF" stroke="#0080FF" stroke-width="2.82821"/>
<path d="M20.5545 13.0525C20.5545 16.6685 17.4872 19.6952 13.5835 19.6952C9.6798 19.6952 6.61253 16.6685 6.61253 13.0525C6.61253 9.43646 9.6798 6.40971 13.5835 6.40971C17.4872 6.40971 20.5545 9.43646 20.5545 13.0525Z" fill="#DFEDFF" stroke="#0080FF" stroke-width="2.82821"/>
</svg>
`;

export const BackIconR = () => <SvgXml xml={back} />;
export const SearchIcon = () => <SvgXml xml={search} />;
export const WriteIcon = () => <SvgXml xml={write} />;
Expand All @@ -162,6 +169,7 @@ export const OptionLIcon = () => <SvgXml xml={option_l} />;
export const EditIcon = () => <SvgXml xml={edit} />;
export const DeleteIcon = () => <SvgXml xml={deleteIcon} />;
export const WarningIcon = () => <SvgXml xml={warning} />;
export const PlaceMiniIcon = () => <SvgXml xml={place_mini} />;

export const BackIcon = ({ onPress }) => (
<SvgXml xml={back} onPress={onPress} />
Expand Down
Binary file added src/assets/images/home/slide/slide3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/home/slide/slide4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/components/common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const styles = StyleSheet.create({
paddingRight: 24,
},
headerTitle: {
fontSize: 24,
fontSize: 20,
fontFamily: 'SpoqaHanSansNeo-Medium',
color: '#000000',
},
centerTitle: {
Expand Down
3 changes: 2 additions & 1 deletion src/components/common/SearchHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ const styles = StyleSheet.create({
},
input: {
flex: 1,
fontSize: 15,
fontSize: 12,
color: '#333333',
paddingHorizontal: 12,
fontFamily: 'SpoqaHanSansNeo-Regular',
},
searchButton: {
paddingHorizontal: 8,
Expand Down
21 changes: 14 additions & 7 deletions src/components/community/AddressItem.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import React from 'react';
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import PropTypes from 'prop-types';
import { PlaceBIcon } from '../../assets/icons/iconSvg';
import { PlaceMiniIcon } from '../../assets/icons/iconSvg';

const AddressItem = ({ item, onPress }) => {
return (
<TouchableOpacity style={styles.container} onPress={() => onPress(item.id)}>
<TouchableOpacity
style={styles.container}
onPress={() =>
onPress(item.id, item.latitude, item.longitude, item.roadAddress)
}
>
<View style={styles.iconContainer}>
<PlaceBIcon />
<PlaceMiniIcon />
</View>
<View style={styles.textContainer}>
<Text style={styles.title}>{item.title}</Text>
Expand All @@ -30,6 +35,8 @@ AddressItem.propTypes = {
title: PropTypes.string.isRequired,
roadAddress: PropTypes.string.isRequired,
jibunAddress: PropTypes.string.isRequired,
latitude: PropTypes.number.isRequired,
longitude: PropTypes.number.isRequired,
}).isRequired,
onPress: PropTypes.func.isRequired,
};
Expand All @@ -55,7 +62,7 @@ const styles = StyleSheet.create({
flex: 1,
},
title: {
fontSize: 24,
fontSize: 20,
color: '#151515',
marginBottom: 12,
},
Expand All @@ -69,20 +76,20 @@ const styles = StyleSheet.create({
textAlign: 'center',
backgroundColor: '#FFFFFF',
color: '#0080FF',
fontSize: 16,
fontSize: 12,
paddingVertical: 2,
borderWidth: 1,
borderColor: '#0080FF',
borderRadius: 10,
marginRight: 8,
},
roadAddress: {
fontSize: 18,
fontSize: 12,
color: '#151515',
flex: 1,
},
jibunAddress: {
fontSize: 18,
fontSize: 12,
color: '#585858',
flex: 1,
},
Expand Down
1 change: 1 addition & 0 deletions src/components/community/ChatInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ const styles = StyleSheet.create({
padding: 10,
fontSize: 16,
color: '#000000',
fontFamily: 'SpoqaHanSansNeo-Regular',
},
});
5 changes: 4 additions & 1 deletion src/components/community/ChatItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@ const styles = StyleSheet.create({
userName: {
fontSize: 16,
color: '#3D3D3D',
fontFamily: 'SpoqaHanSansNeo-Regular',
},
messageContainer: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 8,
},
lastMessage: {
fontSize: 11,
fontSize: 12,
color: '#636363',
fontFamily: 'SpoqaHanSansNeo-Regular',
flex: 1,
},
unreadBadge: {
Expand All @@ -79,6 +81,7 @@ const styles = StyleSheet.create({
},
unreadCount: {
color: '#FFFFFF',
fontFamily: 'SpoqaHanSansNeo-Regular',
fontSize: 11,
},
});
8 changes: 6 additions & 2 deletions src/components/community/ChatMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,27 @@ const styles = StyleSheet.create({
textLeft: {
color: '#494949',
fontSize: 16,
fontFamily: 'SpoqaHanSansNeo-Regular',
},
textRight: {
color: '#FFFFFF',
fontSize: 16,
fontFamily: 'SpoqaHanSansNeo-Regular',
},
timestampLeft: {
fontSize: 13,
fontSize: 10,
marginTop: 4,
color: '#000000',
opacity: 0.25,
fontFamily: 'SpoqaHanSansNeo-Regular',
alignSelf: 'flex-start',
},
timestampRight: {
fontSize: 13,
fontSize: 10,
marginTop: 4,
color: '#000000',
opacity: 0.25,
fontFamily: 'SpoqaHanSansNeo-Regular',
alignSelf: 'flex-end',
},
});
Loading

0 comments on commit 7fa605e

Please sign in to comment.