Refactor recent projects into it's own cell (#558)

This commit was merged in pull request #558.
This commit is contained in:
Kurt Hutten
2021-10-16 03:35:44 +11:00
committed by GitHub
parent dc92920481
commit 55917395b4
6 changed files with 66 additions and 77 deletions

View File

@@ -1,7 +1,5 @@
import { Link, routes } from '@redwoodjs/router'
import type { Projects_Of_User } from 'types/graphql'
import Projects from 'src/components/Projects/Projects'
export const QUERY = gql`
query PROJECTS_OF_USER($userName: String!) {
projects(userName: $userName) {
@@ -20,6 +18,7 @@ export const QUERY = gql`
userName
}
Reaction {
id
emote
}
}
@@ -38,17 +37,18 @@ export const Empty = ({ isMinimal = false }) => {
export const Success = ({
projects,
variables: { userName },
shouldFilterProjectsWithoutImage = false,
projectLimit = 80,
isMinimal = false,
}: {
projects: Projects_Of_User['projects']
shouldFilterProjectsWithoutImage: boolean
projectLimit: number
}) => {
return (
<Projects
projects={projects}
shouldFilterProjectsWithoutImage={shouldFilterProjectsWithoutImage}
projectLimit={projectLimit}
isMinimal={isMinimal}
/>
)
}