diff --git a/src/components/PreviewProject.tsx b/src/components/PreviewProject.tsx
index cddae500ba..61e93ee200 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..d4d0beb266 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,
@@ -125,17 +124,6 @@ const ProjectList = () => {
key={i}
>
-
- {e.projectName}
-
-
- {e.user.name}
-
) : (
radioValue === e.tag && (
@@ -153,16 +141,6 @@ const ProjectList = () => {
key={i}
>
- {e.projectName}
-
-
- {e.user.name}
-
)
),