+
광고회사
-
주식회사 장스푸드
+
{data?.agency}
-
+
제작사
-
주식회사 장스푸드
+
{data?.manufacturer}
@@ -44,7 +53,7 @@ export const AdvInfo = () => {
export const AdvInfoContainer = styled.div`
display: flex;
flex-direction: column;
- gap: 8px;
+ gap: 20px;
`;
export const TextContainer = styled.div`
@@ -61,24 +70,40 @@ export const TextContainer = styled.div`
margin: 3px 0px;
}
- .title {
- color: ${(props) => props.theme.gray_01};
- font-size: 20px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
- letter-spacing: -0.4px;
+ .title-line {
+ display: flex;
+ justify-content: space-between;
+
+ svg {
+ font-size: 30px;
+ fill: ${(props) => props.theme.gray_02};
+ }
+
+ .title {
+ color: ${(props) => props.theme.gray_01};
+ font-size: 20px;
+ font-style: normal;
+ font-weight: 700;
+ line-height: normal;
+ letter-spacing: -0.4px;
+ }
}
.adv-info {
display: flex;
- gap: 12px;
+ flex-direction: column;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
letter-spacing: -0.28px;
+ .adv-item {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ }
+
p {
color: ${(props) => props.theme.gray_02};
}
diff --git a/src/components/advertisement-detail/SimilarItem.tsx b/src/components/advertisement-detail/SimilarItem.tsx
index bf204a3..f3d8a17 100644
--- a/src/components/advertisement-detail/SimilarItem.tsx
+++ b/src/components/advertisement-detail/SimilarItem.tsx
@@ -6,39 +6,55 @@ export type SimilarItemProps = {
createdAt: string;
moodInfo: string[];
isArchived?: boolean;
-};
+}[];
-export const SimilarItem = ({ data }: { data: SimilarItemProps }) => {
+export const SimilarItem = ({
+ data,
+ mood,
+}: {
+ data: SimilarItemProps;
+ mood: string[];
+}) => {
return (
-
-
-
-
{data.title}
-
{data.createdAt}2
-
- {data.moodInfo.map((item, idx) => {
- return
#{item}
;
- })}
-
-
-
+ <>
+
비슷한 분위기의 영상
+
{mood?.map((item, idx) => #{item}
)}
+
+ {data?.map((item, idx) => {
+ return (
+
+
+
+
{item.title}
+
{item.createdAt}
+
+ {item.moodInfo.map((item, idx) => {
+ return
#{item}
;
+ })}
+
+
+
+ );
+ })}
+ >
);
};
export const SimilarItemContainer = styled.div`
display: flex;
- flex-direction: row;
gap: 20px;
width: 390px;
height: 114px;
/* height: 100%; */
+ padding: 10px 0px;
+ /* box-sizing: border-box; */
img {
max-width: 202px;
width: 100%;
height: 100%;
object-fit: cover;
- border: 1px solid red;
+ border-radius: 6px;
}
.text-box {
@@ -46,7 +62,6 @@ export const SimilarItemContainer = styled.div`
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
- border: 1px solid blue;
width: 100%;
.tag-box {
@@ -91,3 +106,27 @@ export const SimilarItemContainer = styled.div`
}
}
`;
+
+export const SimTitle = styled.div`
+ overflow: hidden;
+ color: ${(props) => props.theme.gray_01};
+ text-overflow: ellipsis;
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 600;
+ line-height: 180%;
+ letter-spacing: -0.32px;
+`;
+
+export const SimTag = styled.div`
+ color: ${(props) => props.theme.red_01};
+ font-size: 16px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: 180%;
+ letter-spacing: -0.32px;
+ display: flex;
+ flex-direction: row;
+ gap: 13px;
+ align-items: center;
+`;
diff --git a/src/pages/adv-detail/AdvDetailPage.tsx b/src/pages/adv-detail/AdvDetailPage.tsx
new file mode 100644
index 0000000..b38e714
--- /dev/null
+++ b/src/pages/adv-detail/AdvDetailPage.tsx
@@ -0,0 +1,110 @@
+import { useParams } from 'react-router-dom';
+import {
+ SimilarItem,
+ SimilarItemProps,
+} from '../../components/advertisement-detail/SimilarItem';
+import {
+ AdvAnalysis,
+ AdvAnalysisProps,
+} from '../../components/advertisement-detail/AdvAnalysis';
+import {
+ AdvInfo,
+ AdvInfoProps,
+} from '../../components/advertisement-detail/AdvInfo';
+import styled from 'styled-components';
+import { useEffect, useState } from 'react';
+import {
+ getAdvertisementAnalysis,
+ getAdvertisementExpression,
+ getAdvertisementInfo,
+ getSimilarAdvertisement,
+} from '../../api/advertisement';
+import {
+ AdvExpression,
+ ExpressionProps,
+} from '../../components/advertisement-detail/AdvExpression';
+
+export const AdvDetailPage = () => {
+ const { advertisementId } = useParams();
+ const advId = Number(advertisementId);
+ const [similarData, setSimilarData] = useState
();
+ const [infoData, setInfoData] = useState();
+ const [moodInfo, setMoodInfo] = useState();
+
+ // video-analysis data
+ const [analData, setAnalData] = useState();
+
+ // video-expression data
+ const [expressionData, setExpressionData] = useState();
+
+ useEffect(() => {
+ getSimilarAdvertisement(advId)
+ .then((res) => {
+ // console.log('res:', res);
+ setSimilarData(res.data.advertisementSimilarResponseList);
+ })
+ .catch((err) => {
+ console.log('err:', err);
+ });
+
+ //info
+ getAdvertisementInfo(advId)
+ .then((res) => {
+ // console.log('info:', res);
+ setInfoData(res.data);
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+
+ //video-analysis
+ getAdvertisementAnalysis(advId)
+ .then((res) => {
+ // console.log('anal', res);
+ setMoodInfo(res.data.moodInfo);
+ setAnalData(res.data);
+ })
+ .catch((err) => console.log(err));
+
+ //video-expression
+ getAdvertisementExpression(advId)
+ .then((res) => {
+ // console.log('ex', res);
+ setExpressionData(res.data);
+ })
+ .catch((err) => console.log(err));
+ }, []);
+
+ return (
+
+
+
+
+
+
+ );
+};
+
+export const AdvDetailPageContainer = styled.div`
+ margin: 0 auto;
+ display: flex;
+ max-width: 1300px;
+ border: 1px solid red;
+ padding: 40px 0px;
+ box-sizing: border-box;
+ gap: 32px;
+`;
+
+export const Divider = styled.div`
+ border: 1px solid ${(props) => props.theme.gray_05};
+ margin: 30px 0px;
+ box-sizing: border-box;
+`;