프로필 관리하기
대표 키워드 수정은{' '}
diff --git a/src/app/(main)/page.tsx b/src/app/(main)/page.tsx
index 373935ff..3ef30c2f 100644
--- a/src/app/(main)/page.tsx
+++ b/src/app/(main)/page.tsx
@@ -1,5 +1,24 @@
+import { Metadata } from 'next';
import { redirect } from 'next/navigation';
+export async function generateMetadata(): Promise {
+ return {
+ title: `TEAMFICIAL`,
+ description: `소프트스킬 팀빌딩 서비스, 팀피셜`,
+ openGraph: {
+ title: `TEAMFICIAL`,
+ description: `소프트스킬 팀빌딩 서비스, 팀피셜`,
+ images: [
+ {
+ url: 'https://www.teamficial.com/og/Teamficial_metatag_Image.jpg',
+ width: 1200,
+ height: 630,
+ },
+ ],
+ },
+ };
+}
+
export default function RootPage() {
redirect('/project');
}
diff --git a/src/app/(main)/project/[id]/_components/InfoItem.tsx b/src/app/(main)/project/[id]/_components/InfoItem.tsx
index 38d43e32..f3d06f70 100644
--- a/src/app/(main)/project/[id]/_components/InfoItem.tsx
+++ b/src/app/(main)/project/[id]/_components/InfoItem.tsx
@@ -18,7 +18,7 @@ const InfoItem = ({ label, value, className = '' }: InfoItemProps) => {
href={value}
target="_blank"
rel="noopener noreferrer"
- className="body-4 text-primary-900 line-clamp-1 break-all underline"
+ className="desktop:body-4 body-8 text-primary-900 line-clamp-1 break-all underline"
title={value}
>
{value}
diff --git a/src/app/(main)/project/[id]/_components/ProjectImage.tsx b/src/app/(main)/project/[id]/_components/ProjectImage.tsx
new file mode 100644
index 00000000..e569778e
--- /dev/null
+++ b/src/app/(main)/project/[id]/_components/ProjectImage.tsx
@@ -0,0 +1,22 @@
+import { ResponseProject } from '@/types/project';
+import Image from 'next/image';
+
+const ProjectImage = ({ images }: ResponseProject) => {
+ if (!images || images.length === 0) return null;
+ return (
+
+ {images.map((img, index) => (
+
+ ))}
+
+ );
+};
+
+export default ProjectImage;
diff --git a/src/app/(main)/project/[id]/_components/ProjectInfo.tsx b/src/app/(main)/project/[id]/_components/ProjectInfo.tsx
index 012de31c..90926dbf 100644
--- a/src/app/(main)/project/[id]/_components/ProjectInfo.tsx
+++ b/src/app/(main)/project/[id]/_components/ProjectInfo.tsx
@@ -5,21 +5,33 @@ import ProjectTitle from './ProjectTitle';
import InfoCard from './InfoCard';
import Profile1 from '@/components/profile/Profile1';
import { useGetProject } from '@/hooks/queries/useProject';
+import ProjectImage from './ProjectImage';
const ProjectInfo = ({ id }: { id: string }) => {
- const { data } = useGetProject({ postId: Number(id) });
+ const { data } = useGetProject(
+ { postId: Number(id) },
+ { refetchOnMount: true, refetchOnWindowFocus: true },
+ );
if (!data) return null;
- const sanitizedContent = DOMPurify.sanitize(data.content);
+ const sanitizedContent = DOMPurify.sanitize(data.content.replace(/<\/p>/g, '
'));
+ const isWriter = data.writer;
return (
-
+
+ {/* TODO: 프로젝트 이미지 부분 복구 */}
+ {/*
*/}
diff --git a/src/app/(main)/project/[id]/_components/ProjectTitle.tsx b/src/app/(main)/project/[id]/_components/ProjectTitle.tsx
index d2589e50..a89b173d 100644
--- a/src/app/(main)/project/[id]/_components/ProjectTitle.tsx
+++ b/src/app/(main)/project/[id]/_components/ProjectTitle.tsx
@@ -9,6 +9,7 @@ import Link from 'next/link';
import { useUserStore } from '@/store/useUserStore';
import { useRouter } from 'next/navigation';
import Image from 'next/image';
+import { useMediaQuery } from '@/hooks/useMediaQuery';
const ProjectTitle = ({
postId,
@@ -26,12 +27,15 @@ const ProjectTitle = ({
const isLoggedIn = !!userName;
const navigate = useRouter();
+ const isDesktop = useMediaQuery('(min-width: 1024px)');
+
const handleApplyModal = () => {
if (!isLoggedIn) {
window.alert('로그인이 필요합니다.');
navigate.push('/login');
} else {
- openModal('apply', { postId, recruitingPositions });
+ const modalType = isDesktop ? 'apply' : 'applyMo';
+ openModal(modalType, { postId, recruitingPositions });
}
};
@@ -49,7 +53,7 @@ const ProjectTitle = ({
-
+
{title}
diff --git a/src/app/(main)/project/[id]/applicants/_components/CurrentApplicantItem.tsx b/src/app/(main)/project/[id]/applicants/_components/CurrentApplicantItem.tsx
index 3bc73a75..bda5c225 100644
--- a/src/app/(main)/project/[id]/applicants/_components/CurrentApplicantItem.tsx
+++ b/src/app/(main)/project/[id]/applicants/_components/CurrentApplicantItem.tsx
@@ -61,7 +61,9 @@ const CurrentApplicantItem = ({
{item.profilePosition}
-
키워드
+ {(item.keywordList || []).map((keyword, index) => (
+
{keyword}
+ ))}
);
diff --git a/src/app/(main)/project/[id]/applicants/_components/CurrentApplicants.tsx b/src/app/(main)/project/[id]/applicants/_components/CurrentApplicants.tsx
index 8af22fac..8c2f1fd6 100644
--- a/src/app/(main)/project/[id]/applicants/_components/CurrentApplicants.tsx
+++ b/src/app/(main)/project/[id]/applicants/_components/CurrentApplicants.tsx
@@ -28,6 +28,8 @@ const CurrentApplicants = ({
openModal('partner', {
applicationId,
recruitingPostId,
+ profilePosition: applicants.find((app) => app.applicationId === applicationId)
+ ?.profilePosition,
});
};
diff --git a/src/app/(main)/project/[id]/applicants/_components/ProjectInfo.tsx b/src/app/(main)/project/[id]/applicants/_components/ProjectInfo.tsx
index b9ec59f8..5fa9d739 100644
--- a/src/app/(main)/project/[id]/applicants/_components/ProjectInfo.tsx
+++ b/src/app/(main)/project/[id]/applicants/_components/ProjectInfo.tsx
@@ -55,7 +55,9 @@ const ProjectInfo = ({ id }: { id: string }) => {
);
if (!data) return null;
- const sanitizedContent = DOMPurify.sanitize(data.recruitingPost.recruitingPostContent);
+ const sanitizedContent = DOMPurify.sanitize(
+ data.recruitingPost.recruitingPostContent.replace(/
<\/p>/g, '
'),
+ );
const filteredApplicants = selectedPosition
? data.applicantList.filter((item) => item.profilePosition === POSITION_KR[selectedPosition])
diff --git a/src/app/(main)/project/[id]/edit/_components/FormEditor.tsx b/src/app/(main)/project/[id]/edit/_components/FormEditor.tsx
index ca46e1ee..e75cd23d 100644
--- a/src/app/(main)/project/[id]/edit/_components/FormEditor.tsx
+++ b/src/app/(main)/project/[id]/edit/_components/FormEditor.tsx
@@ -9,7 +9,11 @@ type Props = {
};
const FormEditor = ({ postId }: Props) => {
- const { data: projectData, isLoading, isError } = useGetProject({ postId });
+ const {
+ data: projectData,
+ isLoading,
+ isError,
+ } = useGetProject({ postId }, { refetchOnMount: false, refetchOnWindowFocus: false });
if (isLoading) {
return (
diff --git a/src/app/(main)/project/[id]/page.tsx b/src/app/(main)/project/[id]/page.tsx
index c2e16416..34902c93 100644
--- a/src/app/(main)/project/[id]/page.tsx
+++ b/src/app/(main)/project/[id]/page.tsx
@@ -1,5 +1,24 @@
import React from 'react';
import ProjectInfo from './_components/ProjectInfo';
+import { Metadata } from 'next';
+
+export async function generateMetadata(): Promise
{
+ return {
+ title: `TEAMFICIAL`,
+ description: `소프트스킬 팀빌딩 서비스, 팀피셜`,
+ openGraph: {
+ title: `TEAMFICIAL`,
+ description: `소프트스킬 팀빌딩 서비스, 팀피셜`,
+ images: [
+ {
+ url: 'https://www.teamficial.com/og/Teamficial_metatag_Image.jpg',
+ width: 1200,
+ height: 630,
+ },
+ ],
+ },
+ };
+}
type Props = {
params: Promise<{ id: string }>;
diff --git a/src/app/(main)/project/_components/Banner.tsx b/src/app/(main)/project/_components/Banner.tsx
index 82f37dae..6d644368 100644
--- a/src/app/(main)/project/_components/Banner.tsx
+++ b/src/app/(main)/project/_components/Banner.tsx
@@ -17,7 +17,7 @@ const Banner = () => {
}
router.push(`/teampsylog`);
- const url = `${window.location.origin}/question/${uuid}`;
+ const url = `${window.location.origin}/teampsylog/head/${uuid}`;
await navigator.clipboard.writeText(url);
addToast({ message: '링크가 복사되었어요' });
};
@@ -26,7 +26,7 @@ const Banner = () => {
<>