diff --git a/src/app/page.tsx b/src/app/page.tsx
index f682f79..bf16129 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -12,13 +12,11 @@ export default function Page() {
const user = mockUser;
return (
-
-
-
- {user.username}, 歡迎來到 CommonGround
-
-
-
-
+
+
+ {user.username}, 歡迎來到 CommonGround
+
+
+
);
}
diff --git a/src/components/AuthorViewpoint/EditViewpointFact.tsx b/src/components/AuthorViewpoint/EditViewpointFact.tsx
new file mode 100644
index 0000000..d67d975
--- /dev/null
+++ b/src/components/AuthorViewpoint/EditViewpointFact.tsx
@@ -0,0 +1,32 @@
+import { Fact } from "@/types/conversations.types";
+import Link from "next/link";
+
+type FactCardProps = {
+ fact: Fact;
+};
+
+export default function EditViewpointFact({ fact }: FactCardProps) {
+ return (
+
+
{fact.title}
+ {fact.references.map((reference) => (
+
+
+
+
+ {new URL(reference.url).hostname}
+
+
+ {reference.title}
+
+
+
+ ))}
+
+ );
+}
diff --git a/src/components/AuthorViewpoint/FactListCard.tsx b/src/components/AuthorViewpoint/FactListCard.tsx
new file mode 100644
index 0000000..8d6850f
--- /dev/null
+++ b/src/components/AuthorViewpoint/FactListCard.tsx
@@ -0,0 +1,62 @@
+"use client";
+import { Fact } from "@/types/conversations.types";
+import EditViewpointFact from "@/components/AuthorViewpoint/EditViewpointFact";
+import { MagnifyingGlassIcon, PlusIcon } from "@heroicons/react/24/outline";
+import { Select, Button } from "@mantine/core";
+import { useState } from "react";
+
+type FactListCardProps = {
+ facts: Fact[];
+};
+
+export default function FactListCard({ facts }: FactListCardProps) {
+ const [searchData] = useState([
+ "This development could disrupt the EV market",
+ "Google.com",
+ "CommonGround",
+ ]);
+ return (
+
+
+ 事實
+
+
+
+
+
+
+ {/* 265px = 56px(header) + 69px(margin-top between header and this div) + 32px(padding-bottom of main)
+ + 92px(FactListCard title and search box) + 16px(FactListCard padding-bottom)*/}
+
+ );
+}
diff --git a/src/components/Conversation/ViewPoints/AddViewPointBar.tsx b/src/components/Conversation/ViewPoints/AddViewPointBar.tsx
index babf592..052787d 100644
--- a/src/components/Conversation/ViewPoints/AddViewPointBar.tsx
+++ b/src/components/Conversation/ViewPoints/AddViewPointBar.tsx
@@ -8,9 +8,9 @@ type AddViewPointBarProps = {
export default function AddViewPointBar({ id }: AddViewPointBarProps) {
console.log(`Try to add Viewpoint on issue ${id}`);
return (
-
+
diff --git a/src/mock/conversationMock.ts b/src/mock/conversationMock.ts
index 1e52f39..392e9b5 100644
--- a/src/mock/conversationMock.ts
+++ b/src/mock/conversationMock.ts
@@ -1,18 +1,6 @@
import { Fact, Issue, ViewPoint } from "@/types/conversations.types";
import { UserRepresentation } from "@/types/users.types";
-export const mockIssue: Issue = {
- id: 1,
- title: "Breakthrough in Electric Vehicle Battery Technology Announced",
- summary:
- "San Francisco, CA — In a significant leap forward for electric vehicle (EV) technology, researchers at GreenTech Innovations announced today the development of a new battery that could revolutionize the industry. The new design promises to double the range of EVs while reducing charging time to under 15 minutes.The breakthrough was made possible by a novel combination of advanced materials that increase energy density while ensuring battery stability. GreenTech CEO, Michael Foster, stated, “We believe this advancement will accelerate the mass adoption of electric vehicles and contribute significantly to reducing carbon emissions globally.”Experts have pointed out that while the technology shows promise, it will take time to scale up production and integrate it into the existing infrastructure. Additionally, questions remain about the long-term environmental impact of mining the rare materials used in the batteries.",
-};
-export const mockEmptyIssue: Issue = {
- id: 2,
- title: "CommonGround, A New Social Media Platform Game Changer!",
- summary: "",
-};
-
export const mockFact: Fact = {
id: 1,
title: "This development could disrupt the EV market",
@@ -32,6 +20,21 @@ export const mockFact: Fact = {
],
};
+export const mockIssue: Issue = {
+ id: 1,
+ title: "Breakthrough in Electric Vehicle Battery Technology Announced",
+ summary:
+ "San Francisco, CA — In a significant leap forward for electric vehicle (EV) technology, researchers at GreenTech Innovations announced today the development of a new battery that could revolutionize the industry. The new design promises to double the range of EVs while reducing charging time to under 15 minutes.The breakthrough was made possible by a novel combination of advanced materials that increase energy density while ensuring battery stability. GreenTech CEO, Michael Foster, stated, “We believe this advancement will accelerate the mass adoption of electric vehicles and contribute significantly to reducing carbon emissions globally.”Experts have pointed out that while the technology shows promise, it will take time to scale up production and integrate it into the existing infrastructure. Additionally, questions remain about the long-term environmental impact of mining the rare materials used in the batteries.",
+ facts: [mockFact, mockFact, mockFact, mockFact],
+};
+
+export const mockEmptyIssue: Issue = {
+ id: 2,
+ title: "CommonGround, A New Social Media Platform Game Changer!",
+ summary: "",
+ facts: [],
+};
+
export const mockUser: UserRepresentation = {
username: "Sarah Fields",
avatar: "/favicon.ico",
diff --git a/src/types/conversations.types.ts b/src/types/conversations.types.ts
index 7ac6299..7c4f0dc 100644
--- a/src/types/conversations.types.ts
+++ b/src/types/conversations.types.ts
@@ -4,6 +4,7 @@ export interface Issue {
id: number;
title: string;
summary: string;
+ facts: Fact[];
}
export interface FactReference {