diff --git a/src/components/PreviewProject.tsx b/src/components/PreviewProject.tsx
index cddae500ba..64511d62eb 100644
--- a/src/components/PreviewProject.tsx
+++ b/src/components/PreviewProject.tsx
@@ -1,9 +1,9 @@
import React from 'react'
-import { Box, Spinner } from '@chakra-ui/core'
-import { Project } from '@prisma/client'
+import { Box, Spinner, Icon, Text, Avatar } from '@chakra-ui/core'
+import { Project, User } from '@prisma/client'
interface Props {
- project: Project
+ project: Project & { user: User }
}
const PreviewProject = (props: Props) => {
@@ -11,9 +11,31 @@ const PreviewProject = (props: Props) => {
{!props.project ? (
+ ) : props.project.thumbnail ? (
+
) : (
-
+
+
+ No screenshot for this project
+
)}
+
+
+ {props.project.projectName}
+
+
+ {props.project.user.name}
+
+
)
}
diff --git a/src/pages/project/public/index.tsx b/src/pages/project/public/index.tsx
index 0b1f02088c..348c56942e 100644
--- a/src/pages/project/public/index.tsx
+++ b/src/pages/project/public/index.tsx
@@ -5,7 +5,6 @@ import {
Box,
SimpleGrid,
PseudoBox,
- Avatar,
RadioGroup,
Radio,
Spinner,
@@ -108,7 +107,7 @@ const ProjectList = () => {
) : projects && projects?.project.length > 0 ? (
-
+
{projects?.project.map((e: Project & { user: User }, i: number) =>
radioValue === 'all' ? (
{
key={i}
>
-
- {e.projectName}
-
-
- {e.user.name}
-
) : (
radioValue === e.tag && (
@@ -153,16 +141,6 @@ const ProjectList = () => {
key={i}
>
- {e.projectName}
-
-
- {e.user.name}
-
)
),