diff --git a/src/App.tsx b/src/App.tsx
index 0a38a59..0414c7b 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -85,14 +85,14 @@ const router = createBrowserRouter(routeObjects);
const App = () => {
const { currentUser } = useAuth();
const location = window.location;
- useEffect(() => {
- if (
- (!currentUser || !currentUser.senderId) &&
- !location.pathname.startsWith("/auth")
- ) {
- location.replace("/auth/login");
- }
- }, [currentUser, location]);
+ // useEffect(() => {
+ // if (
+ // (!currentUser || !currentUser.senderId) &&
+ // !location.pathname.startsWith("/auth")
+ // ) {
+ // location.replace("/auth/login");
+ // }
+ // }, [currentUser, location]);
return ;
};
diff --git a/src/assets/svg/Heart.svg b/src/assets/svg/Heart.svg
new file mode 100644
index 0000000..33190de
--- /dev/null
+++ b/src/assets/svg/Heart.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/Calendar/Calendar/index.tsx b/src/components/Calendar/Calendar/index.tsx
index 3243ea3..22803c8 100644
--- a/src/components/Calendar/Calendar/index.tsx
+++ b/src/components/Calendar/Calendar/index.tsx
@@ -4,6 +4,7 @@ import { Dates, YearMonthDate } from "@/types/common";
import * as S from "./Calendar.styled";
import PrevIcon from "@/assets/svg/icon-arrow-left.svg?react";
import NextIcon from "@/assets/svg/icon-arrow-right.svg?react";
+import HeartIcon from "@/assets/svg/Heart.svg";
export interface Props {
dates: Dates[];
diff --git a/src/pages/auth/Login.tsx b/src/pages/auth/Login.tsx
index 595b778..834702c 100644
--- a/src/pages/auth/Login.tsx
+++ b/src/pages/auth/Login.tsx
@@ -51,6 +51,7 @@ const Login = () => {
onChangeValue={onChangeName}
leftIcon={NameIcon}
/>
+
{
})),
}}
/>
+
{
onChangeValue={onChangeName}
leftIcon={NameIcon}
/>
+
{
})),
}}
/>
+
{
})),
}}
/>
-
+
{
+ const location = useLocation();
+ const navigate = useNavigate();
+
+ const [writeState, setWriteState] = useState<"create" | "update">("create");
+ const [title, setTitle] = useState("");
+ const [content, setContent] = useState("");
+ const [sing, setSing] = useState("");
+ const [date, setDate] = useState("");
+
+ const handleEditButton = () => {
+ mutate({
+ title: "",
+ content: "",
+ sing: "",
+ date: "",
+ });
+ };
+
+ const handleCancelButton = () => {
+ navigate(-1);
+ };
+
+ const onChangeTitle = (e: ChangeEvent) => {
+ setTitle(e.target.value);
+ };
+ const onChangeContent = (e: ChangeEvent) => {
+ setContent(e.target.value);
+ };
+
+ const onChangeSing = (e: ChangeEvent) => {
+ setSing(e.target.value);
+ };
+ const onChangeDate = (e: ChangeEvent) => {
+ setDate(e.target.value);
+ };
+
+ useEffect(() => {
+ if (location && location.state?.update) {
+ setWriteState("update");
+ // todo : 다이어리 글 상태관리
+ } else {
+ setWriteState("create");
+ }
+ }, [location]);
+
+ return (
+ <>
+
+ 일기 {writeState === "create" ? "작성" : "수정"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+export default Update;
+
+export const CreateDiv = styled.div`
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+`;
+
+function mutate(arg0: {
+ title: string;
+ content: string;
+ sing: string;
+ date: string;
+}) {
+ throw new Error("Function not implemented.");
+}
+
+const StyledH1 = styled.div`
+ padding: 50px;
+ font-size: 60pt;
+`;
+
+const ButtonWrapper = styled.div`
+ display: flex;
+ gap: 10px;
+ width: 100%;
+`;
diff --git a/src/pages/mypage/list.tsx b/src/pages/mypage/list.tsx
new file mode 100644
index 0000000..447af50
--- /dev/null
+++ b/src/pages/mypage/list.tsx
@@ -0,0 +1,82 @@
+import { useLocation, useNavigate } from "react-router-dom";
+import { ChangeEvent, useState, useRef, useEffect } from "react";
+import styled from "styled-components";
+import HeartIcon from "@/assets/svg/Heart.svg";
+
+const list = () => {
+ const location = useLocation();
+ const navigate = useNavigate();
+
+ const [title, setTitle] = useState("");
+ const [date, setDate] = useState("");
+
+ const handleEditButton = () => {
+ mutate({
+ title: "",
+ date: "",
+ });
+ };
+
+ return (
+ <>
+
+ 제목: {title}
+
+ 날짜: {date}
+ 🤍 6
+ 💬 5
+
+
+ 제목: {title}
+
+ 날짜: {date}
+ 🤍 6
+ 💬 5
+
+
+ 제목: {title}
+
+ 날짜: {date}
+ 🤍 6
+ 💬 5
+
+
+ 제목: {title}
+
+ 날짜: {date}
+ 🤍 6
+ 💬 5
+
+ >
+ );
+};
+
+export default list;
+
+function mutate(arg0: { title: string; date: string }) {
+ throw new Error("Function not implemented.");
+}
+
+export const ListDiv = styled.div`
+ width: 100%;
+ height: 100px;
+ margin-top: 100px;
+ padding: 10px;
+ border-bottom: ${({ theme }) => theme.boxBorder.bookBorder};
+ border-radius: 4px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+`;
+
+const StyledH3 = styled.div`
+ margin-left: 20px;
+ padding: 10px;
+ font-size: 30pt;
+`;
+
+const StyledH5 = styled.div`
+ margin-right: 300px;
+ padding: 10px;
+ font-size: 20pt;
+`;