From f3cda5bbaa24a85f0352ad0c01ff23698572176b Mon Sep 17 00:00:00 2001 From: kyuhho Date: Thu, 12 Dec 2024 12:46:12 +0900 Subject: [PATCH 1/3] chore: remove wrong sitemap (#426) --- generateSitemap.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/generateSitemap.mjs b/generateSitemap.mjs index 2f3855b9..e86521dd 100644 --- a/generateSitemap.mjs +++ b/generateSitemap.mjs @@ -16,7 +16,6 @@ const generateSitemap = async () => { { url: '/open-consult', changefreq: 'always', priority: 1.0 }, { url: '/open-consult/likes', changefreq: 'always', priority: 0.8 }, { url: '/open-consult/recents', changefreq: 'always', priority: 0.8 }, - { url: '/categorySearch', changefreq: 'daily', priority: 0.7 }, { url: '/service', changefreq: 'never', priority: 0.8 }, { url: '/service-unavailable', changefreq: 'monthly', priority: 0.5 }, ]; From 2c7ba8555d9edb55321f5d444baca94946357912 Mon Sep 17 00:00:00 2001 From: kyuhho Date: Thu, 12 Dec 2024 12:46:25 +0900 Subject: [PATCH 2/3] chore(package): add react-helmet (#426) --- package-lock.json | 28 ++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 29 insertions(+) diff --git a/package-lock.json b/package-lock.json index d3d1153e..2fb2117e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "react-cookie": "^7.0.1", "react-device-detect": "^2.2.3", "react-dom": "^18.2.0", + "react-helmet": "^6.1.0", "react-microsoft-clarity": "^1.2.0", "react-router-dom": "^6.21.1", "react-scripts": "5.0.1", @@ -15486,6 +15487,25 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "node_modules/react-fast-compare": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", + "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" + }, + "node_modules/react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "dependencies": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + }, + "peerDependencies": { + "react": ">=16.3.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -15614,6 +15634,14 @@ "node": ">=10" } }, + "node_modules/react-side-effect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz", + "integrity": "sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==", + "peerDependencies": { + "react": "^16.3.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/react-textarea-autosize": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", diff --git a/package.json b/package.json index fc04ea91..e88edec0 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "react-cookie": "^7.0.1", "react-device-detect": "^2.2.3", "react-dom": "^18.2.0", + "react-helmet": "^6.1.0", "react-microsoft-clarity": "^1.2.0", "react-router-dom": "^6.21.1", "react-scripts": "5.0.1", From 893004293107c9934045a57d7a44658e586eea28 Mon Sep 17 00:00:00 2001 From: kyuhho Date: Thu, 12 Dec 2024 13:07:51 +0900 Subject: [PATCH 3/3] feat: apply open consult, profile react helmet (#426) --- package-lock.json | 10 ++ package.json | 1 + .../MainQuestionSection.tsx | 76 +++++++------- src/pages/Buyer/BuyerCounselorProfile.tsx | 99 ++++++++++--------- 4 files changed, 107 insertions(+), 79 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2fb2117e..944130aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,6 +45,7 @@ }, "devDependencies": { "@types/react-dom": "^18.2.18", + "@types/react-helmet": "^6.1.11", "husky": "4" } }, @@ -4714,6 +4715,15 @@ "@types/react": "*" } }, + "node_modules/@types/react-helmet": { + "version": "6.1.11", + "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.11.tgz", + "integrity": "sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/react-transition-group": { "version": "4.4.10", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", diff --git a/package.json b/package.json index e88edec0..4d02293f 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ }, "devDependencies": { "@types/react-dom": "^18.2.18", + "@types/react-helmet": "^6.1.11", "husky": "4" } } diff --git a/src/components/Buyer/BuyerOpenConsultDetail/MainQuestionSection.tsx b/src/components/Buyer/BuyerOpenConsultDetail/MainQuestionSection.tsx index 2140cf88..be6cf971 100644 --- a/src/components/Buyer/BuyerOpenConsultDetail/MainQuestionSection.tsx +++ b/src/components/Buyer/BuyerOpenConsultDetail/MainQuestionSection.tsx @@ -18,6 +18,8 @@ import { deletePostLikes, deletePostScraps } from 'api/delete'; import { formattedMessage } from 'utils/formattedMessage'; import { Flex } from 'components/Common/Flex'; +import { Helmet } from 'react-helmet'; + // // // @@ -128,40 +130,46 @@ function MainQuestionSection() { // return ( - - -
- {card?.title} - {!card?.isPublic && ( - - - 비공개 - - )} -
- -
{formattedMessage(card?.content)}
- -
- {card?.updatedAt} - - {card?.consultCategory} -
- -
- - - {isLike ? : } - - {card?.totalLike} - - - {isSave ? : } - - {card?.totalScrap} - - -
+ <> + + {`${card?.title} | 셰어마인드 공개 상담`} + + + + +
+ {card?.title} + {!card?.isPublic && ( + + + 비공개 + + )} +
+ +
{formattedMessage(card?.content)}
+ +
+ {card?.updatedAt} + + {card?.consultCategory} +
+ +
+ + + {isLike ? : } + + {card?.totalLike} + + + {isSave ? : } + + {card?.totalScrap} + + +
+ ); } diff --git a/src/pages/Buyer/BuyerCounselorProfile.tsx b/src/pages/Buyer/BuyerCounselorProfile.tsx index 7452c4e0..40c9371b 100644 --- a/src/pages/Buyer/BuyerCounselorProfile.tsx +++ b/src/pages/Buyer/BuyerCounselorProfile.tsx @@ -12,6 +12,7 @@ import { import { Space } from 'components/Common/Space'; import { useLayoutEffect, useState } from 'react'; +import { Helmet } from 'react-helmet'; import { useNavigate, useParams } from 'react-router-dom'; import styled from 'styled-components'; import { AppendCategoryType } from 'utils/AppendCategoryType'; @@ -102,52 +103,60 @@ export const BuyerCounselorProfile = () => { if (id !== undefined) { const counselorId = parseInt(id, 10); return ( - - - - - + + {`${profileData.nickname} | 셰어마인드 상담사 프로필`} + + + + + + + + {isInfo ? ( + <> + + + + + + ) : ( + + )} + + - {isInfo ? ( - <> - - - - - - ) : ( - - )} - - - + + ); } else { return <>404 error;