diff --git a/src/components/diary/carousel/DiaryCard.tsx b/src/components/diary/carousel/DiaryCard.tsx
index 1ec2584..7b05a9c 100644
--- a/src/components/diary/carousel/DiaryCard.tsx
+++ b/src/components/diary/carousel/DiaryCard.tsx
@@ -14,7 +14,6 @@ const DiaryCard = ({
id,
content,
createdDate,
- modifiedDate,
isEditing,
setIsEditing,
isLetterSent,
@@ -29,8 +28,6 @@ const DiaryCard = ({
setSendModalVisible,
isEditModalVisible,
setEditModalVisible,
- isInformModalVisible,
- setInformModalVisible,
setSnackbar,
addNewDiary,
removeDiary,
@@ -112,24 +109,9 @@ const DiaryCard = ({
setIsEditing(false);
return;
}
- if (isLetterSent) {
- setInformModalVisible(true);
- return;
- }
- sendDiaryData();
- };
-
- const onConfirmSaveEdit = () => {
- setInformModalVisible(false);
sendDiaryData();
};
- const onCancelSaveEdit = () => {
- setInformModalVisible(false);
- setIsEditing(false);
- setDiaryInput(content);
- };
-
const onKeyboardDismiss = () => {
setIsEditing(false);
Keyboard.dismiss();
@@ -146,7 +128,7 @@ const DiaryCard = ({
{isSuccess ? (
-
{sendDiary.isPending && }
>
);
diff --git a/src/components/diary/carousel/DiaryCardHeader.tsx b/src/components/diary/carousel/DiaryCardHeader.tsx
index 9beb652..53cba85 100644
--- a/src/components/diary/carousel/DiaryCardHeader.tsx
+++ b/src/components/diary/carousel/DiaryCardHeader.tsx
@@ -10,7 +10,7 @@ import { DiaryButtonType } from '@type/Diary';
interface DiaryCardHeaderProps {
isNew: boolean;
- modifiedDate: string;
+ createdDate: string;
timeStartWriting: string;
isEditing: boolean;
isLetterSent: boolean;
@@ -28,7 +28,7 @@ const formatTime = (time: string) => {
const DiaryCardHeader = ({
isNew,
- modifiedDate,
+ createdDate,
timeStartWriting,
isEditing,
isLetterSent,
@@ -42,9 +42,7 @@ const DiaryCardHeader = ({
return (
-
- {isEditing ? formatTime(timeStartWriting) : formatTime(modifiedDate)}
-
+ {formatTime(createdDate) || formatTime(timeStartWriting)}
{Platform.OS === 'web' && isEditing && (
{
id={item.id}
content={item.content}
createdDate={item.createdDate}
- modifiedDate={item.modifiedDate}
isEditing={isEditing}
setIsEditing={setIsEditing}
isLetterSent={sendStatus}
@@ -62,7 +61,6 @@ const DiaryCarousel = () => {
id={NEW_DIARY}
content=""
createdDate=""
- modifiedDate=""
isEditing={isEditing}
setIsEditing={setIsEditing}
isLetterSent={sendStatus}
diff --git a/src/components/diary/carousel/DiaryCarousel.web.tsx b/src/components/diary/carousel/DiaryCarousel.web.tsx
index 9875a67..c202bde 100644
--- a/src/components/diary/carousel/DiaryCarousel.web.tsx
+++ b/src/components/diary/carousel/DiaryCarousel.web.tsx
@@ -41,7 +41,6 @@ const DiaryCarousel = () => {
id={data[activeIndex]?.id || NEW_DIARY}
content={data[activeIndex]?.content || ''}
createdDate={data[activeIndex]?.createdDate}
- modifiedDate={data[activeIndex]?.modifiedDate}
isEditing={isEditing}
setIsEditing={setIsEditing}
isLetterSent={sendStatus}
diff --git a/src/components/diary/carousel/DiaryPagination.tsx b/src/components/diary/carousel/DiaryPagination.tsx
index f11986c..c7bc2ba 100644
--- a/src/components/diary/carousel/DiaryPagination.tsx
+++ b/src/components/diary/carousel/DiaryPagination.tsx
@@ -11,7 +11,7 @@ const DiaryPagination = ({ activeIndex, diaryList }: IDiaryPaginationProps) => {
return (
{diaryList.length === 0 && }
- {diaryList.map((diary, index) => {
+ {diaryList.map((_, index) => {
return ;
})}
diff --git a/src/components/setting/SettingSection.tsx b/src/components/setting/SettingSection.tsx
index 811b1d1..e3c87b0 100644
--- a/src/components/setting/SettingSection.tsx
+++ b/src/components/setting/SettingSection.tsx
@@ -1,6 +1,5 @@
import React from 'react';
import MyText from '@components/common/MyText';
-import TextButton from '@components/common/TextButton';
import { Pressable, StyleSheet, View } from 'react-native';
import { fontLarge } from '@utils/Sizing';
@@ -8,7 +7,6 @@ interface ISectionProps {
label: string;
content?: string;
onPress?: () => void;
- onLabelPress?: () => void;
textColor?: string;
icon?: React.ReactNode;
}
@@ -17,37 +15,28 @@ const SettingSection = ({
label,
content = '',
onPress,
- onLabelPress,
textColor = 'black',
icon,
}: ISectionProps) => {
return (
-
- {onLabelPress ? (
-
- {({ pressed }) => (
-
- {label}
-
- )}
-
- ) : (
-
- {label}
-
- )}
- {onPress ? (
-
- {content}
-
- ) : (
-
- {icon}
- {content}
-
- )}
-
+ [
+ styles.button,
+ state.pressed && { opacity: 0.5 },
+ state.hovered && { backgroundColor: 'rgba(31, 27, 21, 0.06)' },
+ !onPress && { cursor: 'default' },
+ ]}
+ onPress={onPress}
+ >
+
+ {label}
+
+
+ {icon}
+ {content}
+
+
);
};
@@ -55,22 +44,22 @@ const SettingSection = ({
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
- paddingTop: 11,
+ borderBottomWidth: 1,
+ borderBottomColor: '#D5D5D5',
},
- content: {
- paddingVertical: 6,
+ button: {
+ padding: 5,
+ marginVertical: 6,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
- borderBottomWidth: 1,
- borderBottomColor: '#D5D5D5',
+ borderRadius: 5,
},
pressed: {
opacity: 0.5,
},
contentContainer: {
flexDirection: 'row',
- marginHorizontal: 8,
marginVertical: 9,
},
});
diff --git a/src/hooks/diary/useDiaryActions.ts b/src/hooks/diary/useDiaryActions.ts
index c6f1a25..6c066f3 100644
--- a/src/hooks/diary/useDiaryActions.ts
+++ b/src/hooks/diary/useDiaryActions.ts
@@ -27,7 +27,6 @@ export const useDiaryActions = ({ setIsEditing, setTimeStartWriting }: IUseDiary
const [isDeleteModalVisible, setIsDeleteModalVisible] = useState(false);
const [isSendModalVisible, setSendModalVisible] = useState(false);
const [isEditModalVisible, setEditModalVisible] = useState(false);
- const [isInformModalVisible, setInformModalVisible] = useState(false);
const addNewDiary = useMutation({
mutationFn: (data: IDiaryPostRequest) => postDiary(data),
@@ -114,8 +113,6 @@ export const useDiaryActions = ({ setIsEditing, setTimeStartWriting }: IUseDiary
setSendModalVisible,
isEditModalVisible,
setEditModalVisible,
- isInformModalVisible,
- setInformModalVisible,
setSnackbar,
addNewDiary,
removeDiary,
diff --git a/src/screens/setting/SettingTermsScreen.tsx b/src/screens/setting/SettingTermsScreen.tsx
index 96bbf15..2a5449d 100644
--- a/src/screens/setting/SettingTermsScreen.tsx
+++ b/src/screens/setting/SettingTermsScreen.tsx
@@ -42,13 +42,10 @@ const SettingTermsScreen = () => {
return (
- setModalName('policy')} />
- setModalName('terms')} />
- setModalName('openSource')}
- />
- {/* setModalName('business')} /> */}
+ setModalName('policy')} />
+ setModalName('terms')} />
+ setModalName('openSource')} />
+ {/* setModalName('business')} /> */}
);
};
diff --git a/src/types/Diary.ts b/src/types/Diary.ts
index c085072..be0ad48 100644
--- a/src/types/Diary.ts
+++ b/src/types/Diary.ts
@@ -4,7 +4,7 @@ export interface IDiary {
id: number;
content: string;
createdDate: string;
- modifiedDate: string;
+ modifiedDate?: string;
}
export interface IDiaryList {