Skip to content

Commit

Permalink
Merge pull request #79 from DearMyPeace/dev/78-기록-저장-시-diarycount-확인/#78
Browse files Browse the repository at this point in the history


fix: 달 바꾸는 부분 수정
  • Loading branch information
hyobb109 authored Jul 8, 2024
2 parents c36a214 + 5aa5450 commit 77e6190
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
17 changes: 16 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,22 @@
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<title>Dear My Peace</title>
<title>심심조각</title>
<meta name="title" content="심심조각" />
<meta name="description" content="조각글이 모여 만들어진 나만의 상담사" />

<meta property="og:type" content="website" />
<meta property="og:url" content="https://dear-my-peace.site/" />
<meta property="og:title" content="심심조각" />
<meta property="og:description" content="조각글이 모여 만들어진 나만의 상담사" />
<meta property="og:image" content="https://dear-my-peace.site/logo/logo_kakao_kor.png" />

<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://dear-my-peace.site/" />
<meta property="twitter:title" content="심심조각" />
<meta property="twitter:description" content="조각글이 모여 만들어진 나만의 상담사" />
<meta property="twitter:image" content="https://dear-my-peace.site/logo/logo_kakao_kor.png" />

<link rel="apple-touch-icon" sizes="180x180" href="./favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="./favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./favicon/favicon-16x16.png" />
Expand Down
Binary file added public/logo/logo_kakao_kor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 9 additions & 8 deletions src/components/diary/calendar/MyCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,26 @@ const MyCalendar = () => {
}, {} as IMarkedDates);

useEffect(() => {
setSelectedMonth(parseInt(selectedDate.slice(5, 7), 10));
setSelectedYear(parseInt(selectedDate.slice(0, 4), 10));
const year = new Date(selectedDate).getFullYear();
const month = new Date(selectedDate).getMonth() + 1;
setSelectedMonth(month);
setSelectedYear(year);
setTargetMonth({
year: selectedYear.toString(),
month: selectedMonth.toString().padStart(2, '0') as IDate['month'],
year: year.toString() as IDate['year'],
month: month.toString().padStart(2, '0') as IDate['month'],
});
saveDateStatus(selectedDate);
}, [selectedDate]);

const handleModalDismiss = () => {
const day = selectedDate.slice(8, 10);
const lastDay = new Date(selectedYear, selectedMonth, 0).getDate();
// console.log(`day : ${day}, lastDay : ${lastDay}`);
const month = selectedMonth.toString().padStart(2, '0');
if (parseInt(day, 10) > lastDay) {
setSelectedDate(`${selectedYear}-${selectedMonth.toString().padStart(2, '0')}-${lastDay}`);
setSelectedDate(`${selectedYear}-${month}-${lastDay}`);
} else {
setSelectedDate(`${selectedYear}-${selectedMonth.toString().padStart(2, '0')}-${day}`);
setSelectedDate(`${selectedYear}-${month}-${day}`);
}
// setSelectedDate(`${selectedYear}-${selectedMonth.toString().padStart(2, '0')}-01`);
setModalVisible(false);
};

Expand Down
3 changes: 2 additions & 1 deletion src/components/setting/SettingSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const styles = StyleSheet.create({
},
contentContainer: {
flexDirection: 'row',
paddingHorizontal: 10,
marginHorizontal: 8,
marginVertical: 9,
},
});

Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ module.exports = {
from: path.resolve(appDirectory, 'public/favicon'),
to: path.resolve(appDirectory, 'dist/favicon'),
},
{
from: path.resolve(appDirectory, 'public/logo'),
to: path.resolve(appDirectory, 'dist/logo'),
},
],
}),
],
Expand Down

0 comments on commit 77e6190

Please sign in to comment.