From b0aa3eeaa9d34780ed9f493dd60d24cda63bff28 Mon Sep 17 00:00:00 2001 From: daiki0381 Date: Wed, 13 Mar 2024 00:13:36 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Atomic=20Design?= =?UTF-8?q?=E3=81=A7=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/career-edit/[userId]/page.tsx | 2 +- src/components/{ => organisms}/EditingCareerCalendar.tsx | 2 +- src/components/{ => organisms}/EditingCareerEvent.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/components/{ => organisms}/EditingCareerCalendar.tsx (96%) rename src/components/{ => organisms}/EditingCareerEvent.tsx (95%) diff --git a/src/app/career-edit/[userId]/page.tsx b/src/app/career-edit/[userId]/page.tsx index b296399..712b0c3 100644 --- a/src/app/career-edit/[userId]/page.tsx +++ b/src/app/career-edit/[userId]/page.tsx @@ -1,6 +1,6 @@ "use client"; -import EditingCareerCalendar from "@/components/EditingCareerCalendar"; +import EditingCareerCalendar from "@/components/organisms/EditingCareerCalendar"; import { useParams } from "next/navigation"; import React from "react"; diff --git a/src/components/EditingCareerCalendar.tsx b/src/components/organisms/EditingCareerCalendar.tsx similarity index 96% rename from src/components/EditingCareerCalendar.tsx rename to src/components/organisms/EditingCareerCalendar.tsx index ad1ff02..fa50a0c 100644 --- a/src/components/EditingCareerCalendar.tsx +++ b/src/components/organisms/EditingCareerCalendar.tsx @@ -3,7 +3,7 @@ import { useCallback, useState } from "react"; import EditingCareerEvent from "./EditingCareerEvent"; import milestones from "@/sample-data/milestones.json"; -import { Milestone } from "../../proto/typescript/pb_out/main"; +import { Milestone } from "../../../proto/typescript/pb_out/main"; // とりあえず100年分のカレンダーを表示 const FULL_YEAR = 100; diff --git a/src/components/EditingCareerEvent.tsx b/src/components/organisms/EditingCareerEvent.tsx similarity index 95% rename from src/components/EditingCareerEvent.tsx rename to src/components/organisms/EditingCareerEvent.tsx index fc98242..4eb67a6 100644 --- a/src/components/EditingCareerEvent.tsx +++ b/src/components/organisms/EditingCareerEvent.tsx @@ -2,7 +2,7 @@ import useEditingCareerEvent from "@/hooks/useEditingCareerEvent"; import { useMemo } from "react"; -import { Milestone } from "../../proto/typescript/pb_out/main"; +import { Milestone } from "../../../proto/typescript/pb_out/main"; type Props = { lifeEvent: Milestone; From 22cb3a91191d469889c2a6939be9af73ff2a8458 Mon Sep 17 00:00:00 2001 From: daiki0381 Date: Wed, 13 Mar 2024 01:12:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/login/page.tsx | 5 ++--- src/components/atoms/LoginButton.tsx | 2 +- src/components/templates/Login.tsx | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/components/templates/Login.tsx diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index fa71549..0060d97 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -3,8 +3,7 @@ import { useRouter } from "next/navigation"; import { auth } from "@/lib/firebase/client"; import { useAuthState } from "react-firebase-hooks/auth"; -import { login } from "@/lib/firebase/auth"; -import LoginButton from "@/components/atoms/LoginButton"; +import Login from "@/components/templates/Login"; const Home = () => { const router = useRouter(); @@ -23,7 +22,7 @@ const Home = () => { ); - return user ? redirectMain() : ; + return user ? redirectMain() : ; }; export default Home; diff --git a/src/components/atoms/LoginButton.tsx b/src/components/atoms/LoginButton.tsx index 207b060..1b4c7ee 100644 --- a/src/components/atoms/LoginButton.tsx +++ b/src/components/atoms/LoginButton.tsx @@ -7,7 +7,7 @@ interface Props { const LoginButton = (props: Props) => { const { onClick } = props; return ( -
+