Skip to content

Commit

Permalink
Merge branch 'main' into KAN-71
Browse files Browse the repository at this point in the history
  • Loading branch information
sjsjmine129 authored May 27, 2024
2 parents 21db60f + 459bbe8 commit 57f9ef1
Show file tree
Hide file tree
Showing 17 changed files with 1,258 additions and 302 deletions.
3 changes: 2 additions & 1 deletion src/assets/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export const COLOR_TEXT60GRAY = '#666666';
export const COLOR_NAVY = '#003C71';
export const COLOR_LIGHTGRAY = '#dddddd';
export const COLOR_RED = '#FF0000';
export const COLOR_BLUE = '#0000FF';
export const COLOR_BLUE = '#0000FF';
export const COLOR_ORANGE = '#FF6A13';
Binary file added src/assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 48 additions & 4 deletions src/assets/svg.js

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

35 changes: 33 additions & 2 deletions src/components/ListModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,35 @@ import AppContext from './AppContext';
const windowWidth = Dimensions.get('window').width;

export default function ListModal(props) {
const {visible, setVisible, title, value, setValue, valueList} = props;
const {visible, setVisible, title, value, setValue, valueList, setLocation} =
props;

const getMyLocation = async () => {
const platformPermissions = PERMISSIONS.ANDROID.ACCESS_FINE_LOCATION;

try {
let result = await request(platformPermissions);
console.log(result);
} catch (err) {
console.warn(err);
}

Geolocation.getCurrentPosition(
position => {
console.log(position.coords.latitude, position.coords.longitude);
const {latitude, longitude} = position.coords;

setLocation({
latitude: latitude,
longitude: longitude,
});
},
error => {
console.log(error.code, error.message);
},
{enableHighAccuracy: true, timeout: 15000, maximumAge: 10000},
);
};

return (
<Modal
Expand Down Expand Up @@ -83,7 +111,10 @@ export default function ListModal(props) {
return (
<AnimatedButton
style={styles.listButton}
onPress={() => {
onPress={async () => {
if (item == '가까운 순') {
getMyLocation();
}
setValue(item);
}}>
{item == value ? (
Expand Down
10 changes: 5 additions & 5 deletions src/components/StoreCompo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export default function StoreCompo(props) {
<Pressable
key={index.toString()}
style={{
width: addPadding
? windowWidth - 32 - 2 * addPadding
: windowWidth - 32,
width: addPadding ? windowWidth - 32 : windowWidth - 32,
height: windowWidth / 3,
paddingHorizontal: addPadding,
// backgroundColor: storeData.id % 2 === 0 ? 'red' : 'blue',
// backgroundColor: 'blue',
}}
onPress={() => {
Expand Down Expand Up @@ -153,15 +153,15 @@ export default function StoreCompo(props) {
fontSize: 11,
color: COLOR_TEXT70GRAY,
}}>
{storeData.firstReview.reviewer + ' 님'}
{storeData.representativeReviewContent.reviewer + ' 님'}
</Text>
<Text
numberOfLines={4}
style={{
fontSize: 11,
color: COLOR_TEXT60GRAY,
}}>
{storeData.firstReview.body}
{storeData.representativeReviewContent.body}
</Text>
</>
) : (
Expand Down
5 changes: 3 additions & 2 deletions src/components/TodayPick.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function TodayPick(props) {
ref={scrollViewRef}>
{todaysPick.map((pickData, index) => {
return (
<StoreCompo storeData={pickData} index={index} addPadding={8} />
<StoreCompo storeData={pickData} index={index} addPadding={10} />
);
})}
</ScrollView>
Expand All @@ -103,7 +103,7 @@ const styles = StyleSheet.create({
marginTop: 15,
width: windowWidth - 32,
padding: 12,
paddingHorizontal: 10,
paddingHorizontal: 0,
backgroundColor: COLOR_WHITE,
borderRadius: 10,
shadowOffset: {
Expand All @@ -116,6 +116,7 @@ const styles = StyleSheet.create({
},
todayPickTitle: {
fontSize: 20,
paddingHorizontal: 10,
color: COLOR_TEXT70GRAY,
fontWeight: '700',
},
Expand Down
2 changes: 0 additions & 2 deletions src/navigation/BottomTabNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import HomeScreen from '../screens/home/HomeScreen';
import ListMainScreen from '../screens/list/ListMainScreen';
import MapScreen from '../screens/map/MapScreen';
import MypageScreen from '../screens/mypage/MypageScreen';
import SearchScreen from '../screens/map/SearchScreen';
import UserDataChangeScreen from '../screens/mypage/UserDataChangeScreen';

const BottomTab = createBottomTabNavigator();
Expand Down Expand Up @@ -94,7 +93,6 @@ function MapNavigator() {
cardStyleInterpolator: customCardStyleInterpolator,
}}>
<MapStack.Screen name="Map" component={MapScreen} />
<MapStack.Screen name="Search" component={SearchScreen} />
</MapStack.Navigator>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/navigation/MainStackNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import CheckEmailScreen from '../screens/signup/CheckEmailScreen';
import ProfileSetScreen from '../screens/signup/ProfileSetScreen';
import CheckEmailScreen2 from '../screens/signup/CheckEmailScreen2';
import ResetPasswordScreen from '../screens/signup/ResetPasswordScreen';
import SearchScreen from '../screens/detail/SearchScreen';

import BottomTabNavigator from './BottomTabNavigator';

Expand Down Expand Up @@ -56,6 +57,7 @@ export default function MainStackNavigator() {
<MainStack.Screen name="CheckEmail" component={CheckEmailScreen} />
<MainStack.Screen name="ProfileSet" component={ProfileSetScreen} />
<MainStack.Screen name="CheckEmail2" component={CheckEmailScreen2} />
<MainStack.Screen name="Search" component={SearchScreen} />
<MainStack.Screen
name="ResetPassword"
component={ResetPasswordScreen}
Expand Down
Loading

0 comments on commit 57f9ef1

Please sign in to comment.