Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const expoConfig = {
backgroundColor: '#ffffff',
},
package: 'com.safezone.onestep',
versionCode: 7,
versionCode: 5,
softwareKeyboardLayoutMode: 'pan',
},
web: {
Expand Down Expand Up @@ -125,7 +125,7 @@ const expoConfig = {
],
'./plugins/withStaticFrameworks',
],
runtimeVersion: '1.0.1',
runtimeVersion: '1.0.0',
updates: {
url: 'https://u.expo.dev/63f6bbd9-1594-44b3-b161-0e0051413ef0',
},
Expand Down
60 changes: 28 additions & 32 deletions app/(tabs)/_layout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import TextInputProvider from '@/contexts/textInputContext';
import '@/locales/index';
import { Tabs } from 'expo-router';
import React from 'react';
Expand All @@ -19,38 +18,35 @@ const inboxIcon = ({ color, size }) => (
const TabLayout = () => {
const { t } = useTranslation();
return (
<TextInputProvider>
<Tabs
screenOptions={{
tabBarHideOnKeyboard: true, // 키보드가 활성화될 때 탭 바 숨기기
tabBarStyle: {
backgroundColor: 'white',
height:
Platform.OS === 'ios' ? verticalScale(75) : verticalScale(45),
},
tabBarLabelStyle: {
...fontStyles.Paragraph.P1.M_100,
},
<Tabs
screenOptions={{
tabBarHideOnKeyboard: true, // 키보드가 활성화될 때 탭 바 숨기기
tabBarStyle: {
backgroundColor: 'white',
height: Platform.OS === 'ios' ? verticalScale(75) : verticalScale(45),
},
tabBarLabelStyle: {
...fontStyles.Paragraph.P1.M_100,
},
}}
>
<Tabs.Screen
name="index"
options={{
title: t('views.tabs/_layout.today'),
tabBarIcon: todayIcon,
headerShown: false,
}}
>
<Tabs.Screen
name="index"
options={{
title: t('views.tabs/_layout.today'),
tabBarIcon: todayIcon,
headerShown: false,
}}
/>
<Tabs.Screen
name="inboxView"
options={{
title: t('views.tabs/_layout.inbox'),
tabBarIcon: inboxIcon,
headerShown: false,
}}
/>
</Tabs>
</TextInputProvider>
/>
<Tabs.Screen
name="inboxView"
options={{
title: t('views.tabs/_layout.inbox'),
tabBarIcon: inboxIcon,
headerShown: false,
}}
/>
</Tabs>
);
};

Expand Down
45 changes: 29 additions & 16 deletions app/(tabs)/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { scale, verticalScale } from 'react-native-size-matters';
const TodayView = () => {
const { i18n } = useTranslation();
const { userId } = useContext(LoginContext);
const [isDragging, setIsDragging] = React.useState(false);

const getLoadingText = () => {
if (i18n.language === 'ko') {
return `투두`;
Expand All @@ -40,11 +42,18 @@ const TodayView = () => {
userId: userId,
});

const renderCategoriesTodo = ({ item }) => {
const renderCategoriesTodo = ({ item, index }) => {
const isLastItem = index === categoriesData.length - 1;

return (
<View>
<CategoryMainItem item={item} isToday={true} />
<DailyTodos todosData={todosData} categoryId={item.id} />
<View style={isLastItem ? styles.lastCategoryContainer : null}>
<CategoryMainItem item={item} />
<DailyTodos
todosData={todosData}
categoryId={item.id}
onDragStart={() => setIsDragging(true)}
onDragEnd={() => setIsDragging(false)}
/>
</View>
);
};
Expand All @@ -56,14 +65,14 @@ const TodayView = () => {
<DateProvider>
<CalendarBottomSheetProvider>
<AIBottomSheetProvider>
<KeyboardAvoidingView
style={[styles.container, { paddingBottom: verticalScale(20) }]}
behavior={Platform.OS === 'ios' ? 'padding' : null}
keyboardVerticalOffset={
Platform.OS === 'ios' ? verticalScale(90) : verticalScale(20)
}
>
<SafeAreaView style={styles.container}>
<SafeAreaView style={styles.container}>
<KeyboardAvoidingView
style={[styles.container, { paddingBottom: verticalScale(20) }]}
behavior={Platform.OS === 'ios' ? 'padding' : null}
keyboardVerticalOffset={
Platform.OS === 'ios' ? verticalScale(90) : verticalScale(90)
}
>
<WeeklyCalendar />
<Suspense
fallback={
Expand All @@ -77,12 +86,13 @@ const TodayView = () => {
renderItem={renderCategoriesTodo}
keyExtractor={item => item.id}
contentContainerStyle={styles.flatList}
scrollEnabled={!isDragging}
/>
</Suspense>
<CalendarBottomSheet isTodo={true} item={selectedTodo} />
<SubTodoGenerateBottomSheet item={selectedTodo} />
</SafeAreaView>
</KeyboardAvoidingView>
</KeyboardAvoidingView>
<CalendarBottomSheet isTodo={true} item={selectedTodo} />
<SubTodoGenerateBottomSheet item={selectedTodo} />
</SafeAreaView>
</AIBottomSheetProvider>
</CalendarBottomSheetProvider>
</DateProvider>
Expand All @@ -104,6 +114,9 @@ const styles = StyleSheet.create({
paddingHorizontal: scale(20),
paddingTop: verticalScale(20),
},
lastCategoryContainer: {
paddingBottom: verticalScale(90),
},
});

export default TodayView;
3 changes: 2 additions & 1 deletion app/categoryView/categoryListView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
paddingHorizontal: scale(20),
backgroundColor: 'white',
},
list: {
backgroundColor: 'white',
paddingHorizontal: scale(20),

flex: 1,
},
});
Expand Down
1 change: 1 addition & 0 deletions app/settingsView/settingsAccountView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import '@/locales/index';
import { IndexPath, Layout, Menu, MenuItem } from '@ui-kitten/components';
import React from 'react';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { SafeAreaView, StyleSheet } from 'react-native';
Expand Down
6 changes: 4 additions & 2 deletions app/settingsView/settingsView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useTheme,
} from '@ui-kitten/components';
import { useRouter } from 'expo-router';
import React, { useState } from 'react';
import React, { useContext, useState } from 'react';
import { useTranslation } from 'react-i18next';
import ConfirmModal from '@/components/common/molecules/ConfirmModal';
import { api as Api } from '@/utils/api';
Expand All @@ -25,6 +25,7 @@ import {
} from 'react-native';
import { heightPercentage, widthPercentage } from '@/utils/responsiveSize';
import fontStyles from '@/theme/fontStyles';
import { LoginContext } from '@/contexts/LoginContext';
const privacyPolicyUrl =
'https://swm-onestep.github.io/posts/%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4%EC%B2%98%EB%A6%AC%EB%B0%A9%EC%B9%A8-copy/';
const termsOfServiceUrl =
Expand All @@ -45,6 +46,7 @@ const renderCurrentStatus = currentStatus => () => (
);

const SettingsView = () => {
const { userName } = useContext(LoginContext);
const { t } = useTranslation();
const theme = useTheme();
const { clear: clearStorage } = useStorage();
Expand Down Expand Up @@ -175,7 +177,7 @@ const SettingsView = () => {
<Text style={fontStyles.Subtitle.S2.M_130}>
{t('views.settingsView.greeting')}
</Text>
<Text style={fontStyles.Paragraph.P1.R_100}>user</Text>
<Text style={fontStyles.Paragraph.P1.R_100}>{userName}</Text>
</View>
</View>
<Layout style={styles.layout} level="1">
Expand Down
93 changes: 0 additions & 93 deletions components/InboxSubTodo.jsx

This file was deleted.

Loading
Loading