diff --git a/frontend/src/assets/provile.svg b/frontend/src/assets/provile.svg
new file mode 100644
index 0000000..fdf62c3
--- /dev/null
+++ b/frontend/src/assets/provile.svg
@@ -0,0 +1,24 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/ArticleCard.tsx b/frontend/src/components/ArticleCard.tsx
index a2985d7..8affd30 100644
--- a/frontend/src/components/ArticleCard.tsx
+++ b/frontend/src/components/ArticleCard.tsx
@@ -1,6 +1,6 @@
import { useNavigate } from 'react-router-dom';
import type { Article } from '../types/Article.ts';
-import { Card } from '@mui/material';
+import { Card, Typography } from '@mui/material';
interface Props {
article: Article;
@@ -8,13 +8,20 @@ interface Props {
export default function ArticleCard(props: Props) {
const navigate = useNavigate();
+ // TODO: Retrieve author id => author name
return (
{ navigate(`/article/${props.article.slug}`) }}
>
- {props.article.name}
+
+
+ {props.article.name}
+
+
+ By {props.article.author_id}
+ {props.article.summary}
);
};
diff --git a/frontend/src/components/Navbar.tsx b/frontend/src/components/Navbar.tsx
index a9819de..06766e2 100644
--- a/frontend/src/components/Navbar.tsx
+++ b/frontend/src/components/Navbar.tsx
@@ -1,24 +1,59 @@
-import { Button } from '@mui/material';
+import { Button, Input } from '@mui/material';
import { Link } from 'react-router-dom';
+import ProfilePlaceholder from "../assets/provile.svg";
export default function Navbar() {
+ // TODO: create search function
+ // TODO: Profile integration
return (
-
-
+
+
+
-
+
+
+
+
+
+

+
);
};
diff --git a/frontend/src/pages/ArticleList.tsx b/frontend/src/pages/ArticleList.tsx
index f67ac9e..4b8059c 100644
--- a/frontend/src/pages/ArticleList.tsx
+++ b/frontend/src/pages/ArticleList.tsx
@@ -1,4 +1,4 @@
-import { useState } from 'react';
+import { useState, useEffect } from 'react';
import { Button } from '@mui/material';
import type { Article } from '../types/Article.ts';
import { ArticleListSchema } from '../types/Article.ts';
@@ -18,11 +18,13 @@ export default function ArticleList() {
const json = await result.json();
const data = ArticleListSchema.parse(json);
- console.log(data);
setArticles(data);
-
};
+ useEffect(() => {
+ getAllArticles();
+ }, []);
+
return (
@@ -32,9 +34,9 @@ export default function ArticleList() {
style={{ border: "solid", borderWidth: "1px" }}
onClick={() => getAllArticles()}
>
- Get All Articles
+ Refresh
-
+
{articles.map((article) => (
))}