From 28db9ec9395be939c440759acccea67ce9bfc5f8 Mon Sep 17 00:00:00 2001 From: VortexExpansion Date: Tue, 20 Feb 2024 12:58:46 +0900 Subject: [PATCH] custom prettier fix --- .prettierrc | 10 +- .vscode/settings.json | 4 + package-lock.json | 8 +- package.json | 2 +- src/app/(pages)/(SigleColumn)/login/page.jsx | 73 +++++----- .../(pages)/(SigleColumn)/register/page.jsx | 71 +++++----- .../(pages)/(SigleColumn)/reminder/page.jsx | 24 ++-- .../(pages)/(SingleColumnLarge)/layout.jsx | 14 +- .../(SingleColumnLarge)/privacy/page.jsx | 2 +- .../(pages)/(TwoColumn)/article/[id]/page.jsx | 28 ++-- src/app/(pages)/(TwoColumn)/article/page.jsx | 30 ++-- .../(pages)/(TwoColumn)/feature/[id]/page.jsx | 28 ++-- .../(pages)/(TwoColumn)/feature/layout.jsx | 20 +-- .../(TwoColumn)/member/delete/page.jsx | 66 ++++----- .../(pages)/(TwoColumn)/member/edit/page.jsx | 132 ++++++++++-------- .../(TwoColumn)/member/limited/[id]/page.jsx | 37 ++--- .../(TwoColumn)/member/mypage/page.jsx | 36 ++--- src/app/(pages)/layout.jsx | 10 +- src/app/(top)/layout.jsx | 42 +++--- src/app/(top)/page.jsx | 22 +-- 20 files changed, 348 insertions(+), 311 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.prettierrc b/.prettierrc index 31eab5b..1cbd8bf 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,5 @@ { - "semi": false, - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "all" - } - \ No newline at end of file + "semi": false, + "tabWidth": 2, + "trailingComma": "all" +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9bf4d12 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true +} diff --git a/package-lock.json b/package-lock.json index 759f15b..2968336 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "eslint": "latest", "eslint-config-next": "latest", "postcss": "latest", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "sass": "^1.69.5", "tailwindcss": "latest" } @@ -4548,9 +4548,9 @@ } }, "node_modules/prettier": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", - "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/package.json b/package.json index dc3e5e9..ec35c03 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "eslint": "latest", "eslint-config-next": "latest", "postcss": "latest", - "prettier": "^3.2.4", + "prettier": "^3.2.5", "sass": "^1.69.5", "tailwindcss": "latest" } diff --git a/src/app/(pages)/(SigleColumn)/login/page.jsx b/src/app/(pages)/(SigleColumn)/login/page.jsx index acada2f..d7b8842 100644 --- a/src/app/(pages)/(SigleColumn)/login/page.jsx +++ b/src/app/(pages)/(SigleColumn)/login/page.jsx @@ -1,43 +1,41 @@ -"use client"; - -import { useUser } from "@/components/common/userContext"; -import { login } from "@/components/common/fetchData"; -import { useRef } from "react"; -import { useRouter } from "next/navigation"; -import Link from "next/link"; -import Breadcrumb from "@/components/common/Breadcrumb"; -import PageTitle from "@/components/common/PageTitle"; -import { getLabels } from "@/components/common/fetchData"; -import AlertError from "@/components/ui/AlertError"; -import { useState } from "react"; +"use client" +import { useUser } from "@/components/common/userContext" +import { login } from "@/components/common/fetchData" +import { useRef } from "react" +import { useRouter } from "next/navigation" +import Link from "next/link" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import { getLabels } from "@/components/common/fetchData" +import AlertError from "@/components/ui/AlertError" +import { useState } from "react" export default function Login() { - const email = useRef(""); - const password = useRef(""); - const { user, loading, storeUser } = useUser(); - const router = useRouter(); - const contentDirectory = getLabels(); - const content = contentDirectory.login; - const [alert, setAlert] = useState(false); + const email = useRef("") + const password = useRef("") + const { user, loading, storeUser } = useUser() + const router = useRouter() + const contentDirectory = getLabels() + const content = contentDirectory.login + const [alert, setAlert] = useState(false) const handleChange = () => { - setAlert(false); - }; + setAlert(false) + } const handleLogin = async (event) => { - event.preventDefault(); - const user = await login(email.current.value, password.current.value); + event.preventDefault() + const user = await login(email.current.value, password.current.value) if (user) { - setAlert(false); - storeUser(user); - router.push("member/mypage"); - } - else{ - setAlert(true); + setAlert(false) + storeUser(user) + router.push("member/mypage") + } else { + setAlert(true) } - }; + } return (
@@ -50,9 +48,14 @@ export default function Login() { ) : user ? (
You have already logged in.
) : ( -
- - {alert && } + + {alert && ( + + )}
)} -
- - ); + ) } diff --git a/src/app/(pages)/(SigleColumn)/register/page.jsx b/src/app/(pages)/(SigleColumn)/register/page.jsx index a28ad49..9f2b854 100644 --- a/src/app/(pages)/(SigleColumn)/register/page.jsx +++ b/src/app/(pages)/(SigleColumn)/register/page.jsx @@ -1,62 +1,68 @@ -"use client"; +"use client" -import Breadcrumb from "@/components/common/Breadcrumb"; -import PageTitle from "@/components/common/PageTitle"; -import { getLabels } from "@/components/common/fetchData"; -import Link from "next/link"; -import { useRef, useState } from "react"; -import { register } from "@/components/common/fetchData"; -import { useUser } from "@/components/common/userContext"; -import { useRouter } from "next/navigation"; -import AlertError from "@/components/ui/AlertError"; +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import { getLabels } from "@/components/common/fetchData" +import Link from "next/link" +import { useRef, useState } from "react" +import { register } from "@/components/common/fetchData" +import { useUser } from "@/components/common/userContext" +import { useRouter } from "next/navigation" +import AlertError from "@/components/ui/AlertError" export default function Register() { - const contentDirectory = getLabels(); - const content = contentDirectory.register; - const { user, loading, storeUser } = useUser(); - const router = useRouter(); - const [alert, setAlert] = useState(false); + const contentDirectory = getLabels() + const content = contentDirectory.register + const { user, loading, storeUser } = useUser() + const router = useRouter() + const [alert, setAlert] = useState(false) - const name1 = useRef(""); - const name2 = useRef(""); - const email = useRef(""); - const login_pwd = useRef(""); + const name1 = useRef("") + const name2 = useRef("") + const email = useRef("") + const login_pwd = useRef("") const handleChange = () => { - setAlert(false); - }; + setAlert(false) + } const handleRegister = async (event) => { - event.preventDefault(); + event.preventDefault() const user = await register( name1.current.value, name2.current.value, email.current.value, - login_pwd.current.value - ); + login_pwd.current.value, + ) if (user) { - setAlert(false); - storeUser(user); - router.push("member/mypage"); + setAlert(false) + storeUser(user) + router.push("member/mypage") } else { - setAlert(true); + setAlert(true) } - }; + } return (
-
+

*は必須項目です。

- {alert && } + {alert && ( + + )}
- ); + ) } diff --git a/src/app/(pages)/(SigleColumn)/reminder/page.jsx b/src/app/(pages)/(SigleColumn)/reminder/page.jsx index 65f0359..8d09cc4 100644 --- a/src/app/(pages)/(SigleColumn)/reminder/page.jsx +++ b/src/app/(pages)/(SigleColumn)/reminder/page.jsx @@ -1,23 +1,23 @@ -'use client' +"use client" -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' -import { getLabels } from '@/components/common/fetchData' -import Link from 'next/link' -import { useRef, useState } from 'react' -import { reminder, reset } from '@/components/common/fetchData' -import AlertSuccess from '@/components/ui/AlertSuccess' +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import { getLabels } from "@/components/common/fetchData" +import Link from "next/link" +import { useRef, useState } from "react" +import { reminder, reset } from "@/components/common/fetchData" +import AlertSuccess from "@/components/ui/AlertSuccess" export default function Reminder({ searchParams }) { const token = searchParams && searchParams.token ? searchParams.token : null const contentDirectory = getLabels() const content = contentDirectory.reminder - const mail = useRef('') - const temp_pwd = useRef('') - const login_pwd = useRef('') + const mail = useRef("") + const temp_pwd = useRef("") + const login_pwd = useRef("") const [alert, setAlert] = useState(false) - const [alertMessage, setAlertMessage] = useState('') + const [alertMessage, setAlertMessage] = useState("") const handleChange = () => { setAlert(false) diff --git a/src/app/(pages)/(SingleColumnLarge)/layout.jsx b/src/app/(pages)/(SingleColumnLarge)/layout.jsx index ca40cca..cd1d2c1 100644 --- a/src/app/(pages)/(SingleColumnLarge)/layout.jsx +++ b/src/app/(pages)/(SingleColumnLarge)/layout.jsx @@ -1,18 +1,16 @@ -import Breadcrumb from "@/components/common/Breadcrumb"; -import PageTitle from "@/components/common/PageTitle"; +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" export default function SingleLargeLayout({ children }) { const content = { text: "プライバシーポリシー", - text_en: "PRIVACY POLICY" - }; + text_en: "PRIVACY POLICY", + } return (
-
- {children} -
+
{children}
) -} \ No newline at end of file +} diff --git a/src/app/(pages)/(SingleColumnLarge)/privacy/page.jsx b/src/app/(pages)/(SingleColumnLarge)/privacy/page.jsx index cd36210..8ca0451 100644 --- a/src/app/(pages)/(SingleColumnLarge)/privacy/page.jsx +++ b/src/app/(pages)/(SingleColumnLarge)/privacy/page.jsx @@ -36,5 +36,5 @@ export default function Privacy() { 改定日:2023年7月1日

- ); + ) } diff --git a/src/app/(pages)/(TwoColumn)/article/[id]/page.jsx b/src/app/(pages)/(TwoColumn)/article/[id]/page.jsx index 75af297..ab8447a 100644 --- a/src/app/(pages)/(TwoColumn)/article/[id]/page.jsx +++ b/src/app/(pages)/(TwoColumn)/article/[id]/page.jsx @@ -1,26 +1,28 @@ -import DetailBody from '@/components/section/twoColumn/DetailBody' -import { getDetails, getAllContentList } from '@/components/common/fetchData' -import Banner from '@/components/common/Banner' -import Breadcrumb from '@/components/common/Breadcrumb' -import TagArea from '@/components/common/TagArea' -import TagKeyword from '@/components/common/TagKeyword' -import Feature from '@/components/section/feature/Feature' +import DetailBody from "@/components/section/twoColumn/DetailBody" +import { getDetails, getAllContentList } from "@/components/common/fetchData" +import Banner from "@/components/common/Banner" +import Breadcrumb from "@/components/common/Breadcrumb" +import TagArea from "@/components/common/TagArea" +import TagKeyword from "@/components/common/TagKeyword" +import Feature from "@/components/section/feature/Feature" export async function generateStaticParams() { const items = await getAllContentList() const paramID = items.map((item) => ({ id: item.topics_id.toString(), })) - return paramID; + return paramID } export default async function Food({ params }) { - const item = await getDetails(params.id); - + const item = await getDetails(params.id) const paths = [ - { href: `/article?topic=${item.contents_type_nm.toLowerCase()}`, label: item.contents_type_ext_col_01 }, - { label: '記事詳細' } + { + href: `/article?topic=${item.contents_type_nm.toLowerCase()}`, + label: item.contents_type_ext_col_01, + }, + { label: "記事詳細" }, ] return ( @@ -29,7 +31,7 @@ export default async function Food({ params }) {
- +
diff --git a/src/app/(pages)/(TwoColumn)/article/page.jsx b/src/app/(pages)/(TwoColumn)/article/page.jsx index 2f74970..0483eda 100644 --- a/src/app/(pages)/(TwoColumn)/article/page.jsx +++ b/src/app/(pages)/(TwoColumn)/article/page.jsx @@ -1,29 +1,29 @@ -import Pager from '@/components/common/Pager' -import { getContentList } from '@/components/common/fetchData' -import CardList from '@/components/ui/CardList' -import Feature from '@/components/section/feature/Feature' -import { getLabels } from '@/components/common/fetchData' -import Banner from '@/components/common/Banner' -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' -import TagArea from '@/components/common/TagArea' -import TagKeyword from '@/components/common/TagKeyword' +import Pager from "@/components/common/Pager" +import { getContentList } from "@/components/common/fetchData" +import CardList from "@/components/ui/CardList" +import Feature from "@/components/section/feature/Feature" +import { getLabels } from "@/components/common/fetchData" +import Banner from "@/components/common/Banner" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import TagArea from "@/components/common/TagArea" +import TagKeyword from "@/components/common/TagKeyword" export default async function Event({ searchParams }) { const page = Number(searchParams && searchParams.page ? searchParams.page : 1) const tag_id = Number( - searchParams && searchParams.tag_id ? searchParams.tag_id : '', + searchParams && searchParams.tag_id ? searchParams.tag_id : "", ) const tag_category_id = Number( searchParams && searchParams.tag_category_id ? searchParams.tag_category_id - : '', + : "", ) const search = searchParams && searchParams.search - ? `%22${searchParams.search.replace(/\s/g, '%20')}%22` - : '' - const topic = searchParams && searchParams.topic ? searchParams.topic : '' + ? `%22${searchParams.search.replace(/\s/g, "%20")}%22` + : "" + const topic = searchParams && searchParams.topic ? searchParams.topic : "" const contentDirectory = getLabels() const { list, pageInfo } = await getContentList(topic, page, tag_id, search) diff --git a/src/app/(pages)/(TwoColumn)/feature/[id]/page.jsx b/src/app/(pages)/(TwoColumn)/feature/[id]/page.jsx index 36f539d..eebcda1 100644 --- a/src/app/(pages)/(TwoColumn)/feature/[id]/page.jsx +++ b/src/app/(pages)/(TwoColumn)/feature/[id]/page.jsx @@ -1,31 +1,35 @@ -import { getFeatureDetails, getFeatureList, getDetails } from "@/components/common/fetchData"; -import FeatureDetailBody from "@/components/section/feature/FeatureDetailBody"; +import { + getFeatureDetails, + getFeatureList, + getDetails, +} from "@/components/common/fetchData" +import FeatureDetailBody from "@/components/section/feature/FeatureDetailBody" export async function generateStaticParams() { - const items = await getFeatureList(); + const items = await getFeatureList() const paramID = items.map((item) => ({ id: item.topics_id.toString(), })) - return paramID; + return paramID } export default async function Event({ params }) { - const item = await getFeatureDetails(params.id); + const item = await getFeatureDetails(params.id) const fetchDetailsForItems = async () => { if (!item?.relatedContents || item.relatedContents.length === 0) { - return []; + return [] } const ids = item.relatedContents .map((item) => item.module_id) - .filter(id => id) - return await Promise.all(ids.map((id) => getDetails(id))); - }; - const details = await fetchDetailsForItems(); + .filter((id) => id) + return await Promise.all(ids.map((id) => getDetails(id))) + } + const details = await fetchDetailsForItems() return (
- ); -} \ No newline at end of file + ) +} diff --git a/src/app/(pages)/(TwoColumn)/feature/layout.jsx b/src/app/(pages)/(TwoColumn)/feature/layout.jsx index 43951d0..16f0e01 100644 --- a/src/app/(pages)/(TwoColumn)/feature/layout.jsx +++ b/src/app/(pages)/(TwoColumn)/feature/layout.jsx @@ -1,13 +1,13 @@ -import { getFeatureList } from "@/components/common/fetchData"; -import Feature from "@/components/section/feature/Feature"; -import Banner from "@/components/common/Banner"; -import Breadcrumb from "@/components/common/Breadcrumb"; -import PageTitle from "@/components/common/PageTitle"; -import TagArea from "@/components/common/TagArea"; -import TagKeyword from "@/components/common/TagKeyword"; +import { getFeatureList } from "@/components/common/fetchData" +import Feature from "@/components/section/feature/Feature" +import Banner from "@/components/common/Banner" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import TagArea from "@/components/common/TagArea" +import TagKeyword from "@/components/common/TagKeyword" export default async function Layout({ children }) { - const data = await getFeatureList(); + const data = await getFeatureList() return (
@@ -22,5 +22,5 @@ export default async function Layout({ children }) {
- ); -} \ No newline at end of file + ) +} diff --git a/src/app/(pages)/(TwoColumn)/member/delete/page.jsx b/src/app/(pages)/(TwoColumn)/member/delete/page.jsx index cf144d9..cd7e9f9 100644 --- a/src/app/(pages)/(TwoColumn)/member/delete/page.jsx +++ b/src/app/(pages)/(TwoColumn)/member/delete/page.jsx @@ -1,48 +1,48 @@ -"use client"; +"use client" -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" import { getLabels, getMemberInfo, deleteMember, -} from "@/components/common/fetchData"; -import Menu from "@/components/common/Menu"; -import Link from "next/link"; -import { useUser } from "@/components/common/userContext"; -import { useState, useEffect } from "react"; -import AlertSuccess from "@/components/ui/AlertSuccess"; +} from "@/components/common/fetchData" +import Menu from "@/components/common/Menu" +import Link from "next/link" +import { useUser } from "@/components/common/userContext" +import { useState, useEffect } from "react" +import AlertSuccess from "@/components/ui/AlertSuccess" export default function Delete() { - const contentDirectory = getLabels(); - const content = contentDirectory.deleteProfile; - const [memberInfo, setMemberInfo] = useState([]); - const { user, storeUser } = useUser(); - const [alert, setAlert] = useState(false); + const contentDirectory = getLabels() + const content = contentDirectory.deleteProfile + const [memberInfo, setMemberInfo] = useState([]) + const { user, storeUser } = useUser() + const [alert, setAlert] = useState(false) useEffect(() => { const memberInfoFunction = async () => { - try { - const info = await getMemberInfo(); - setMemberInfo(info.details); - } catch (error) { - console.error("Error fetching member information", error); + try { + const info = await getMemberInfo() + setMemberInfo(info.details) + } catch (error) { + console.error("Error fetching member information", error) + } } - }; - - memberInfoFunction(); - }, []); + + memberInfoFunction() + }, []) const handleSubmit = async (event) => { - event.preventDefault(); + event.preventDefault() - const userStatus = await deleteMember(); + const userStatus = await deleteMember() if (userStatus) { - storeUser(null); - setAlert(true); + storeUser(null) + setAlert(true) } - }; + } return (
@@ -103,10 +103,12 @@ export default function Delete() {
- {!alert &&
- -
} + {!alert && ( +
+ +
+ )} - ); + ) } diff --git a/src/app/(pages)/(TwoColumn)/member/edit/page.jsx b/src/app/(pages)/(TwoColumn)/member/edit/page.jsx index 70f2dcd..63aadb6 100644 --- a/src/app/(pages)/(TwoColumn)/member/edit/page.jsx +++ b/src/app/(pages)/(TwoColumn)/member/edit/page.jsx @@ -1,72 +1,71 @@ -"use client"; +"use client" -import { useUser } from "@/components/common/userContext"; -import { getLabels } from "@/components/common/fetchData"; -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' -import Menu from "@/components/common/Menu"; -import Link from "next/link"; -import { useState, useEffect, useRef } from "react"; -import { getMemberInfo } from "@/components/common/fetchData"; -import { updateMemberInfo } from "@/components/common/fetchData"; -import AlertSuccess from "@/components/ui/AlertSuccess"; -import AlertError from "@/components/ui/AlertError"; +import { useUser } from "@/components/common/userContext" +import { getLabels } from "@/components/common/fetchData" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import Menu from "@/components/common/Menu" +import Link from "next/link" +import { useState, useEffect, useRef } from "react" +import { getMemberInfo } from "@/components/common/fetchData" +import { updateMemberInfo } from "@/components/common/fetchData" +import AlertSuccess from "@/components/ui/AlertSuccess" +import AlertError from "@/components/ui/AlertError" export default function Edit() { - const { user, storeUser } = useUser(); - const contentDirectory = getLabels(); - const content = contentDirectory.editProfile; - const [memberInfo, setMemberInfo] = useState([]); + const { user, storeUser } = useUser() + const contentDirectory = getLabels() + const content = contentDirectory.editProfile + const [memberInfo, setMemberInfo] = useState([]) - const [successAlert, setSuccessAlert] = useState(false); - const [errorAlert, setErrorAlert] = useState(false); - const [alertMessage, setAlertMessage] = useState(""); + const [successAlert, setSuccessAlert] = useState(false) + const [errorAlert, setErrorAlert] = useState(false) + const [alertMessage, setAlertMessage] = useState("") useEffect(() => { const memberInfoFunction = async () => { - try { - const info = await getMemberInfo(); - setMemberInfo(info.details); - } catch (error) { - console.error("Error fetching member information", error); + try { + const info = await getMemberInfo() + setMemberInfo(info.details) + } catch (error) { + console.error("Error fetching member information", error) + } } - }; - - memberInfoFunction(); - }, []); - const name1 = useRef(""); - const name2 = useRef(""); - const email = useRef(""); - const current_password = useRef(""); - const login_pwd = useRef(""); + memberInfoFunction() + }, []) + + const name1 = useRef("") + const name2 = useRef("") + const email = useRef("") + const current_password = useRef("") + const login_pwd = useRef("") const handleChange = () => { - setSuccessAlert(false); - setErrorAlert(false); - setAlertMessage(""); - }; + setSuccessAlert(false) + setErrorAlert(false) + setAlertMessage("") + } const handleSubmit = async (event) => { - event.preventDefault(); + event.preventDefault() const userStatus = await updateMemberInfo( name1.current.value, name2.current.value, email.current.value, current_password.current.value, - login_pwd.current.value - ); + login_pwd.current.value, + ) - if(userStatus.messages){ - setAlertMessage(userStatus.messages); - setSuccessAlert(true); - } - else{ - setAlertMessage(userStatus.errors); - setErrorAlert(true); + if (userStatus.messages) { + setAlertMessage(userStatus.messages) + setSuccessAlert(true) + } else { + setAlertMessage(userStatus.errors) + setErrorAlert(true) } - }; + } return (
@@ -75,9 +74,13 @@ export default function Edit() {
-
- {successAlert && } - {errorAlert && } + + {successAlert && } + {errorAlert && }
{memberInfo && ( - + )}
- +

半角英数8文字以上

- +
- ); + ) } diff --git a/src/app/(pages)/(TwoColumn)/member/limited/[id]/page.jsx b/src/app/(pages)/(TwoColumn)/member/limited/[id]/page.jsx index 66bce24..a1634c9 100644 --- a/src/app/(pages)/(TwoColumn)/member/limited/[id]/page.jsx +++ b/src/app/(pages)/(TwoColumn)/member/limited/[id]/page.jsx @@ -1,34 +1,37 @@ -import Menu from '@/components/common/Menu' -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' -import { getLabels, getLimitedContentDetails, getAllContentList } from '@/components/common/fetchData' -import LimitedContentBody from '@/components/section/twoColumn/LimitedContentBody'; +import Menu from "@/components/common/Menu" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import { + getLabels, + getLimitedContentDetails, + getAllContentList, +} from "@/components/common/fetchData" +import LimitedContentBody from "@/components/section/twoColumn/LimitedContentBody" export async function generateStaticParams() { // const items = await getLimitedContent() // const paramID = items.map((item) => ({ // id: item.topics_id.toString(), // })) - return [{ id: '18' }, { id: '19' }] + return [{ id: "18" }, { id: "19" }] } export default async function limitedContent({ params }) { - const contentDirectory = getLabels() const content = contentDirectory.limitedContent return ( -
- - -
-
- -
-
- -
+
+ + +
+
+ +
+
+
+
) } diff --git a/src/app/(pages)/(TwoColumn)/member/mypage/page.jsx b/src/app/(pages)/(TwoColumn)/member/mypage/page.jsx index d126621..41bbd64 100644 --- a/src/app/(pages)/(TwoColumn)/member/mypage/page.jsx +++ b/src/app/(pages)/(TwoColumn)/member/mypage/page.jsx @@ -1,21 +1,21 @@ -'use client' -import { useCallback, useRef } from 'react' -import { useUser } from '@/components/common/userContext' -import { logout } from '@/components/common/fetchData' -import { useRouter } from 'next/navigation' +"use client" +import { useCallback, useRef } from "react" +import { useUser } from "@/components/common/userContext" +import { logout } from "@/components/common/fetchData" +import { useRouter } from "next/navigation" import { getMyFavoriteList, getLimitedContent, -} from '@/components/common/fetchData' -import CardList from '@/components/ui/CardList' -import { useState, useEffect } from 'react' -import Pager from '@/components/common/Pager' -import { getLabels } from '@/components/common/fetchData' -import Breadcrumb from '@/components/common/Breadcrumb' -import PageTitle from '@/components/common/PageTitle' -import Menu from '@/components/common/Menu' -import Link from 'next/link' -import Image from 'next/image' +} from "@/components/common/fetchData" +import CardList from "@/components/ui/CardList" +import { useState, useEffect } from "react" +import Pager from "@/components/common/Pager" +import { getLabels } from "@/components/common/fetchData" +import Breadcrumb from "@/components/common/Breadcrumb" +import PageTitle from "@/components/common/PageTitle" +import Menu from "@/components/common/Menu" +import Link from "next/link" +import Image from "next/image" export default function Mypage() { const { user, storeUser } = useUser() @@ -32,7 +32,7 @@ export default function Mypage() { setMyFavourites(favorites.list) setMyFavouritesPageInfo(favorites.pageInfo) } catch (error) { - console.error('Error fetching favorite list:', error) + console.error("Error fetching favorite list:", error) } }, []) @@ -47,7 +47,7 @@ export default function Mypage() { setLimitedContent(limitedContent) console.log(limitedContent) } catch (error) { - console.error('Error fetching member-only list:', error) + console.error("Error fetching member-only list:", error) } } @@ -76,7 +76,7 @@ export default function Mypage() { >
{item.bannerImage.desc diff --git a/src/app/(pages)/layout.jsx b/src/app/(pages)/layout.jsx index 4b8d856..c41fa51 100644 --- a/src/app/(pages)/layout.jsx +++ b/src/app/(pages)/layout.jsx @@ -1,11 +1,11 @@ -import "@/styles/style.scss"; -import Header from "@/components/layouts/Header"; -import Footer from "@/components/layouts/Footer"; +import "@/styles/style.scss" +import Header from "@/components/layouts/Header" +import Footer from "@/components/layouts/Footer" export const metadata = { title: "kuroco Trip", description: "Let's Travel and Enjoy!", -}; +} export default function RootLayout({ children }) { return ( @@ -14,5 +14,5 @@ export default function RootLayout({ children }) { {children}