Skip to content

Commit

Permalink
Merge pull request #34 from Moaguide-develop/feat/productpage
Browse files Browse the repository at this point in the history
Product 세부 정보 업데이트
  • Loading branch information
eun-hak authored Sep 29, 2024
2 parents 12384a8 + 1dc5360 commit d980cec
Show file tree
Hide file tree
Showing 85 changed files with 4,803 additions and 630 deletions.
4 changes: 4 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
const nextConfig = {
experimental: { instrumentationHook: true },
reactStrictMode: true,

images: {
domains: ['www.kobis.or.kr', 'd2qf2amuam62ps.cloudfront.net']
},
swcMinify: true,
compiler: {
styledComponents: true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"react-query": "^3.39.3",
"react-use": "^17.5.1",
"react-virtuoso": "^4.10.1",
"react-youtube": "^10.1.0",
"scroll-lock": "^2.1.5",
"swiper": "^11.1.8",
"uuidv4": "^6.2.13",
Expand Down
Binary file added public/favicon.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import IntegrateMSW from '@/mocks/IntegrateMsw';
import Script from 'next/script';
import ModalProvider from '@/providers/ModalProvider';
import MobileFooter from '@/components/common/MobileFooter';
import GoogleAnalytics from '@/lib/GoogleAnalytics';
import GnbWrapper from '@/components/common/GnbWrapper';


declare global {
interface Window {
kakao: any;
Expand All @@ -25,7 +27,7 @@ export const metadata: Metadata = {
title: '모아가이드',
description: 'STO 큐레이션 플랫폼 모아가이드',
icons: {
icon: '/logo.png'
icon: '/favicon.svg'
},
openGraph: {
title: '모아가이드',
Expand All @@ -45,6 +47,9 @@ export default function RootLayout({
return (
<html lang="kr" className={`${pretendard.variable}`}>
<body className={pretendard.className}>
{process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS ? (
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS} />
) : null}
<IntegrateMSW>
<QueryProvider>
<Script
Expand Down
2 changes: 1 addition & 1 deletion src/app/newissue/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use clinet';
'use client';
import RecentlyIssueIndex from '@/components/recentlyIssue/Index';
import Navbar from '@/components/common/Navbar';
const NewIssuePage = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use clinet';
'use client';
import Navbar from '@/components/common/Navbar';
import HomeIndex from '@/components/home/Index';
import React from 'react';
Expand Down
144 changes: 144 additions & 0 deletions src/app/product/detail/art/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
'use client';
import Container from '@/components/common/Container';
import NavBar from '@/components/product/detail/NavBar';
import News from '@/components/product/detail/News';
import Report from '@/components/product/detail/Report';
import Image from 'next/image';
import { useState } from 'react';
import { getArtProductDetail } from '@/factory/ProductDetail/ArtProductDetail';
import { CATEGORY } from '@/static/category';
import ArtProfit from '@/components/product/detail/art/ArtProfit';
import ArtProductDetail from '@/components/product/detail/art/ArtProductDetail';
import Link from 'next/link';
const ArtDetailpage = (props: { params: { id: string } }) => {
const [sort, setSort] = useState('profit');
const url = props.params.id;
console.log(url);
const { data, isLoading, isError } = getArtProductDetail(props.params.id);
console.log(data);
return (
<div>
<Container>
<div className="flex justify-between md:flex-row desk:flex-col ">
<div className="flex desk2:justify-start desk:justify-center desk:mb-[40px] ">
<Image
src="/images/detail/Profile.png"
width={181}
height={181}
alt="Profile Image"
/>

<div className="desk:hidden desk2:flex flex-col ml-[28px] ">
<div className="flex">
<div className="bg-gray-200 text-gray-400 rounded-md w-[54px] h-[26px] flex justify-center items-center mb-[13px] ">
{CATEGORY[data?.category as string]}
</div>
<div className="text-gray-400 ml-[3px]">{data?.platform}</div>
</div>

<div className="w-80 text-black text-2xl font-bold mb-[60px] ">
{data?.name}
</div>

<div className="desk2:flex desk:hidden">
<Link href={data?.link || '#'}>
<div className=" w-[180px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
</Link>

<div className=" desk2:flex desk:hidden ml-[6px] w-[118px] h-[49px] justify-center items-center border-2 border-gray-200 rounded-xl ">
<div>관심 종목</div>
<Image
src="/images/detail/BookmarkSimple.svg"
width={16}
height={16}
alt="BookMark"
/>
</div>
</div>
</div>
</div>

<div className="desk2:hidden desk:flex flex-col">
<div className="flex flex-col desk2:ml-[28px] desk:ml-[15px] ">
<div className="flex">
<div className="bg-gray-200 text-gray-400 rounded-md w-[54px] h-[26px] flex justify-center items-center mb-[13px] ">
{CATEGORY[data?.category as string]}
</div>
<div className="text-gray-400 ml-[3px]">{data?.platform}</div>
</div>

<div className="w-80 text-black text-2xl font-bold desk2:mb-[60px] desk:mb-[20px] ">
{data?.name}
</div>
</div>
</div>

<div className="flex flex-col desk2:justify-start desk2:items-start desk:justify-center desk:items-center ">
<div className="flex desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">모집금액</div>
<div className="flex flex-row ">
<div>{data?.recruitmentPrice.toLocaleString()}</div>
{/* <div className="text-red-500 "> ({data?.priceRate}%)</div> */}
</div>
</div>

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">모집률</div>
<div>{data?.recruitmentRate.toLocaleString()}%</div>
</div>

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">시가총액</div>
<div>{data?.totalPrice.toLocaleString()}</div>
</div>

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">모집기간</div>
<div className="">~{data?.recruitmentDate}까지</div>
</div>

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">최소투자금</div>
<div>{data?.minInvestment.toLocaleString()}</div>
</div>
</div>

<div className="desk2:hidden desk:flex justify-center mt-[20px] ">
<Link href={data?.link || '#'}>
<div className=" w-[180px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
</Link>
</div>
</div>
</Container>
<NavBar sort={sort} setSort={setSort} />

{sort === 'news' ? (
<News />
) : sort === 'report' ? (
<Report />
) : sort === 'profit' ? (
<ArtProfit url={url} />
) : sort === 'detail' ? (
<ArtProductDetail url={url} />
) : undefined}
</div>
);
};

export default ArtDetailpage;
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
import Container from '@/components/common/Container';
import NavBar from '@/components/product/detail/NavBar';
import News from '@/components/product/detail/News';
import ProductDetail from '@/components/product/detail/ProductDetail';
import Profit from '@/components/product/detail/Profit';
import BuildingProductDetail from '@/components/product/detail/building/BuildingProductDetail';
import BuildingProfit from '@/components/product/detail/building/BuildingProfit';
import Notice from '@/components/product/detail/Notice';
import Report from '@/components/product/detail/Report';
import Image from 'next/image';
import { useState } from 'react';
import { getProductDetail } from '@/factory/ProductDetail';
const Detailpage = (props: any) => {
import { getBuildingProductDetail } from '@/factory/ProductDetail/BuildingProductDetail';
import { CATEGORY } from '@/static/category';
import Link from 'next/link';
const BuildingDetailpage = (props: any) => {
const [sort, setSort] = useState('profit');
const url = props.params.id;
console.log(url);
const { data, isLoading, isError } = getProductDetail(props.params.id);
const { data, isLoading, isError } = getBuildingProductDetail(props.params.id);
console.log(data);
return (
<div>
Expand All @@ -31,7 +33,7 @@ const Detailpage = (props: any) => {
<div className="desk:hidden desk2:flex flex-col ml-[28px] ">
<div className="flex">
<div className="bg-gray-200 text-gray-400 rounded-md w-[54px] h-[26px] flex justify-center items-center mb-[13px] ">
{data?.category === 'building' ? '부동산' : '오류'}
{CATEGORY[data?.category as string]}
</div>
<div className="text-gray-400 ml-[3px]">{data?.platform}</div>
</div>
Expand All @@ -41,15 +43,17 @@ const Detailpage = (props: any) => {
</div>

<div className="desk2:flex desk:hidden">
<div className=" w-[180px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
<Link href={data?.link || '#'}>
<div className=" w-[180px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
</Link>

<div className=" desk2:flex desk:hidden ml-[6px] w-[118px] h-[49px] justify-center items-center border-2 border-gray-200 rounded-xl ">
<div>관심 종목</div>
Expand All @@ -68,7 +72,7 @@ const Detailpage = (props: any) => {
<div className="flex flex-col desk2:ml-[28px] desk:ml-[15px] ">
<div className="flex">
<div className="bg-gray-200 text-gray-400 rounded-md w-[54px] h-[26px] flex justify-center items-center mb-[13px] ">
{data?.category === 'building' ? '부동산' : '오류'}
{CATEGORY[data?.category as string]}
</div>
<div className="text-gray-400 ml-[3px]">{data?.platform}</div>
</div>
Expand Down Expand Up @@ -100,7 +104,7 @@ const Detailpage = (props: any) => {

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
<div className="text-gray-400">배당 수익률</div>
<div className="text-red-500">{data?.lastDivideRate}%</div>
<div className="text-red-500">{data?.lastDivide_rate}%</div>
</div>

<div className="flex mt-[10px] desk:w-[380px] md:w-[300px] justify-between ">
Expand All @@ -110,15 +114,17 @@ const Detailpage = (props: any) => {
</div>

<div className="desk2:hidden desk:flex justify-center mt-[20px] ">
<div className=" w-[380px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
<Link href={data?.link || '#'}>
<div className=" w-[180px] h-[49px] flex justify-center items-center border-2 border-gray-200 rounded-xl">
<div>해당 플랫폼으로 이동</div>
<Image
src="/images/detail/CaretRight.svg"
width={16}
height={16}
alt="Right Arrow"
/>
</div>
</Link>
</div>
</div>
</Container>
Expand All @@ -131,12 +137,12 @@ const Detailpage = (props: any) => {
) : sort === 'report' ? (
<Report />
) : sort === 'profit' ? (
<Profit url={url} />
<BuildingProfit url={url} />
) : sort === 'detail' ? (
<ProductDetail url={url} />
<BuildingProductDetail url={url} />
) : undefined}
</div>
);
};

export default Detailpage;
export default BuildingDetailpage;
File renamed without changes.
Loading

0 comments on commit d980cec

Please sign in to comment.