Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] 분석 차트 페이지용 mock data 추가 #31

Merged
merged 3 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion react-app/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function App() {
<Route path="/IdentifiedArticlesPage" element={<IdentifiedArticlesPage />} /> {/* 판별 기사 목록 페이지 라우팅 */}
<Route
path="/AnalysisPage"
element={<AnalysisPage {...mockAnalysisDataList[0]} />} // 기본적으로 첫 번째 데이터 표시
element={<AnalysisPage {...mockAnalysisData} />}
/> {/* 분석 차트 페이지 라우팅 */}
</Routes>
</Router>
Expand Down
120 changes: 111 additions & 9 deletions react-app/src/data/mockData.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,114 @@
// 개발 및 테스트 목적으로 사용할 수 있는 가짜 데이터를 정의합니다.

export const mockNews = [
{ id: 1, title: "샘플 뉴스 1", content: "이것은 첫 번째 샘플 뉴스입니다." },
{ id: 2, title: "샘플 뉴스 2", content: "이것은 두 번째 샘플 뉴스입니다." },
];
// export const mockNews = [
// { id: 1, title: "샘플 뉴스 1", content: "이것은 첫 번째 샘플 뉴스입니다." },
// { id: 2, title: "샘플 뉴스 2", content: "이것은 두 번째 샘플 뉴스입니다." },
// ];

export const mockUser = {
id: 1,
username: "testuser",
email: "[email protected]"
};
// export const mockUser = {
// id: 1,
// username: "testuser",
// email: "[email protected]"
// };

// 분석 차트 페이지용 Mock Data
export const mockAnalysisDataList = [
{
summary:
"이스라엘과 하마스 간의 충돌이 격화되며 국제 사회는 휴전을 촉구하고 있습니다.",
accuracy: 87,
originalArticle: {
title: "Israel and Hamas Conflict Escalates",
image: "/src/assets/images/conflict1.jpg", // 이미지 경로
description:
"The conflict between Israel and Hamas has intensified, leading to widespread destruction and a growing humanitarian crisis.",
extraDetails:
"Global leaders are urging both sides to agree to a ceasefire to prevent further casualties.",
link: "https://www.bbc.com/news/world-middle-east-67200123",
},
},
{
summary:
"미국의 인플레이션 감축법이 시행됨에 따라 에너지 시장에서 새로운 변화가 예상됩니다.",
accuracy: 92,
originalArticle: {
title: "US Inflation Reduction Act Takes Effect",
image: "/src/assets/images/economy.jpg",
description:
"The Inflation Reduction Act is expected to bring significant changes to the energy and healthcare sectors in the US.",
extraDetails:
"Economists predict that this could reduce household energy costs over the next decade.",
link: "https://www.reuters.com/article/us-economy-inflation-act",
},
},
{
summary:
"유엔은 가자 지구에서 인도적 지원을 강화할 것을 촉구하며 주요 자금 지원을 요구하고 있습니다.",
accuracy: 85,
originalArticle: {
title: "UN Urges Humanitarian Aid for Gaza",
image: "/src/assets/images/humanitarian.jpg",
description:
"The UN has called for immediate international support to provide food, water, and medical supplies to Gaza.",
extraDetails:
"Aid agencies are struggling to meet the growing needs of civilians caught in the conflict.",
link: "https://www.cnn.com/2023/11/24/world/gaza-aid-crisis",
},
},
{
summary:
"지구 온난화의 심각성을 보여주는 새로운 보고서가 공개되었습니다.",
accuracy: 89,
originalArticle: {
title: "Global Warming Reaches Critical Levels",
image: "/src/assets/images/climate.jpg",
description:
"A new report highlights alarming levels of global warming and its impact on polar ice caps and sea levels.",
extraDetails:
"Experts warn of catastrophic consequences if immediate action is not taken.",
link: "https://www.nature.com/articles/climate-crisis-report",
},
},
{
summary:
"한국의 새로운 반도체 정책이 글로벌 반도체 시장에 중요한 영향을 미칠 것으로 예상됩니다.",
accuracy: 94,
originalArticle: {
title: "South Korea's Semiconductor Strategy",
image: "/src/assets/images/semiconductor.jpg",
description:
"South Korea has unveiled a new strategy to dominate the global semiconductor market through heavy investments.",
extraDetails:
"Industry analysts believe this could shift the balance of power in the tech world.",
link: "https://www.koreatimes.co.kr/semiconductor-strategy",
},
},
{
summary:
"AI 기술의 발전으로 인해 예술과 기술의 경계가 더욱 모호해지고 있습니다.",
accuracy: 90,
originalArticle: {
title: "AI and Art: The New Frontier",
image: "/src/assets/images/ai-art.jpg",
description:
"Artificial Intelligence is now creating stunning works of art, raising questions about the future of human creativity.",
extraDetails:
"Artists and technologists are debating the implications of this trend.",
link: "https://www.artnews.com/ai-art-future",
},
},
{
summary:
"일본의 새로운 에너지 정책이 아시아 전역에 큰 영향을 미칠 것으로 보입니다.",
accuracy: 88,
originalArticle: {
title: "Japan's New Energy Policy",
image: "/src/assets/images/energy-policy.jpg",
description:
"Japan's shift towards renewable energy is setting an example for other Asian nations.",
extraDetails:
"This policy aims to reduce carbon emissions significantly by 2030.",
link: "https://www.nikkei.com/energy-policy-japan",
},
},
];
1 change: 1 addition & 0 deletions react-app/src/pages/AnalysisPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useParams } from 'react-router-dom'; // useParams 가져오기
import { mockAnalysisDataList } from '../data/mockData'; // Mock 데이터 가져오기
import { Button } from "../components/ui/Button";
import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card";
import '../components/layout/AnalysisPage.module.css';
import Navbar from '../components/layout/Navbar.jsx';

const AnalysisPage = () => {
Expand Down
Loading