diff --git a/src/app/inquiry/layout.tsx b/src/app/inquiry/layout.tsx index 755fe06..292ae27 100644 --- a/src/app/inquiry/layout.tsx +++ b/src/app/inquiry/layout.tsx @@ -1,3 +1,5 @@ -export default function layout({ children }: { children: React.ReactNode }) { +import type { ReactNode } from 'react' + +export default function layout({ children }: { children: ReactNode }) { return
{children}
} diff --git a/src/app/pw-reset/layout.tsx b/src/app/pw-reset/layout.tsx new file mode 100644 index 0000000..eb72abf --- /dev/null +++ b/src/app/pw-reset/layout.tsx @@ -0,0 +1,23 @@ +import type { ReactNode } from 'react' + +interface PwResetLayoutProps { + children: ReactNode +} + +export default function layout({ children }: PwResetLayoutProps) { + return ( + <> +
+
+
+
+
パスワードをリセットする
+
新しいパスワードを入力してください.
+
+
+ {children} +
+
+ + ) +} diff --git a/src/app/pw-reset/page.tsx b/src/app/pw-reset/page.tsx new file mode 100644 index 0000000..a1ac7f3 --- /dev/null +++ b/src/app/pw-reset/page.tsx @@ -0,0 +1,9 @@ +import PwResetForm from '@/components/pw-reset/PwResetForm' + +export default function page() { + return ( + <> + + + ) +} diff --git a/src/app/suitable/layout.tsx b/src/app/suitable/layout.tsx index 25e2615..e5e7c3f 100644 --- a/src/app/suitable/layout.tsx +++ b/src/app/suitable/layout.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react' +import type { ReactNode } from 'react' interface SuitableLayoutProps { children: ReactNode diff --git a/src/app/survey-sale/layout.tsx b/src/app/survey-sale/layout.tsx index c4e7854..f558ad6 100644 --- a/src/app/survey-sale/layout.tsx +++ b/src/app/survey-sale/layout.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react' +import type { ReactNode } from 'react' interface SurveySaleLayoutProps { children: ReactNode diff --git a/src/components/pw-reset/PwResetForm.tsx b/src/components/pw-reset/PwResetForm.tsx new file mode 100644 index 0000000..1dd3d85 --- /dev/null +++ b/src/components/pw-reset/PwResetForm.tsx @@ -0,0 +1,59 @@ +'use client' + +import { useState } from 'react' +import { useRouter } from 'next/navigation' + +export default function PwResetForm() { + const [pwShow01, setPwShow01] = useState(false) //비밀번호 확인 보이기 숨기기 + const [pwShow02, setPwShow02] = useState(false) //비밀번호 재확인 보이기 숨기기 + const router = useRouter() + + return ( + <> +
+
+
+
+ 新規パスワード再入力 * +
+
+
+ + +
+
+
10文字以内
+
+
+
+ 新規パスワード入力 * +
+
+
+ + +
+
+
10文字以内
+
+
+
+
+ +
+
+ +
+
+
+ + ) +} diff --git a/src/components/ui/common/Header.tsx b/src/components/ui/common/Header.tsx index f2e56ee..4a92c07 100644 --- a/src/components/ui/common/Header.tsx +++ b/src/components/ui/common/Header.tsx @@ -14,6 +14,7 @@ import 'swiper/css' import { axiosInstance } from '@/libs/axios' import { useSessionStore } from '@/store/session' import { useQueryClient } from '@tanstack/react-query' +import { useTitle } from '@/hooks/useTitle' // type HeaderProps = { // name: string //header 이름 @@ -25,10 +26,13 @@ export default function Header({ name }: HeaderProps) { const pathname = usePathname() const { sideNavIsOpen, setSideNavIsOpen } = useSideNavState() const { backBtn } = useHeaderStore() + const { getTitle } = useTitle() const { session, reset } = useSessionStore() const queryClient = useQueryClient() + let title = '' + if (pathname === '/login') { return null } @@ -53,7 +57,7 @@ export default function Header({ name }: HeaderProps) { )}

- {name} + {getTitle(pathname)}

diff --git a/src/hooks/useTitle.ts b/src/hooks/useTitle.ts new file mode 100644 index 0000000..d2f2aa0 --- /dev/null +++ b/src/hooks/useTitle.ts @@ -0,0 +1,37 @@ +export const useTitle = () => { + const getTitle = (pathname: string) => { + // Handle dynamic routes first + if (pathname.startsWith('/survey-sale/') && pathname !== '/survey-sale/basic-info' && pathname !== '/survey-sale/roof-info') { + return '調査物件一覧' + } + + if (pathname.startsWith('/inquiry/') && pathname !== '/inquiry/list' && pathname !== '/inquiry/regist') { + return '1:1お問い合わせ詳細' + } + + // Handle static routes + switch (pathname) { + case '/': + return 'Hanasys 現地調査' + case '/suitable': + return '屋根材適合性の確認' + case '/survey-sale': + return '調査物件一覧' + case '/survey-sale/basic-info': + return '調査物件登録' + case '/survey-sale/roof-info': + return '調査物件新規登録' + case '/inquiry/list': + return '1:1お問い合わせ' + case '/inquiry/regist': + return '1:1お問い合わせ' + case '/pw-reset': + return 'パスワードリセット' + + default: + return 'Hanasys 現地調査' + } + } + + return { getTitle } +}