mirror of
https://github.com/System-End/site.git
synced 2026-04-20 00:25:19 +00:00
Please fix, Max
This commit is contained in:
parent
d5a9cafc75
commit
8030048238
2 changed files with 36 additions and 34 deletions
|
|
@ -29,7 +29,7 @@ const LoginPage = ({token}) => {
|
|||
const [ status, setStatus ] = useState('Loading...')
|
||||
useEffect(async () => {
|
||||
const minWaitTime = sleep(3 * 1000)
|
||||
const response = fetch(`/api/arcade/showcase/login/${token}`, {method: 'POST'})
|
||||
const response = await fetch(`/api/arcade/showcase/login/${token}`, {method: 'POST'})
|
||||
const data = response.json()
|
||||
const [ _wait, _data ] = await Promise.all([minWaitTime, data])
|
||||
|
||||
|
|
|
|||
|
|
@ -10,13 +10,28 @@ import SlideDown from '../../../components/slide-down'
|
|||
import styles from '../../../components/arcade/showcase/my.module.css'
|
||||
|
||||
|
||||
const ProjectGallery = ({ projects }) => (
|
||||
<div className={styles.gallery}>
|
||||
{projects.map(project => (
|
||||
<CohortCard project={project} key={project.id} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
const ProjectGallery = ({ projects }) => {
|
||||
console.log("projects", projects);
|
||||
|
||||
return (
|
||||
<div className={styles.gallery}>
|
||||
{projects.map(project => (
|
||||
<CohortCard
|
||||
key={project.id}
|
||||
id={project.id}
|
||||
title={project.title}
|
||||
desc={project.desc}
|
||||
slack={project.slackLink}
|
||||
codeLink={project.codeLink}
|
||||
playLink={project.playLink}
|
||||
images={project.images}
|
||||
githubProf={project.githubProf}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
const Loading = () => (<div>Loading...</div>)
|
||||
|
||||
|
|
@ -47,6 +62,8 @@ const my = () => {
|
|||
setStatus('success')
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Nav />
|
||||
|
|
@ -71,34 +88,19 @@ const my = () => {
|
|||
zIndex: 1
|
||||
}}
|
||||
>
|
||||
My Ships
|
||||
|
||||
|
||||
|
||||
</Text>
|
||||
<br />
|
||||
<Button
|
||||
as="a"
|
||||
variant="ctaLg"
|
||||
href="https://apply.hackclub.com"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
Add a Project
|
||||
</Button>
|
||||
</Heading>
|
||||
</SlideDown>
|
||||
{
|
||||
status == 'loading' && <Loading />
|
||||
}
|
||||
{
|
||||
status == 'loading' && <Loading />
|
||||
}
|
||||
|
||||
{
|
||||
status == 'error' && <Error error={errorMsg} />
|
||||
}
|
||||
{
|
||||
status == 'error' && <Error error={errorMsg} />
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
status == 'success' && <ProjectGallery projects={projects} />
|
||||
}
|
||||
{
|
||||
|
||||
status == 'success' && <ProjectGallery projects={projects} />
|
||||
}
|
||||
<Text
|
||||
as="span"
|
||||
sx={{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue