diff --git a/components/arcade/showcase/cohort-card.js b/components/arcade/showcase/cohort-card.js index 46adae28..91adcc04 100644 --- a/components/arcade/showcase/cohort-card.js +++ b/components/arcade/showcase/cohort-card.js @@ -17,8 +17,6 @@ const CohortCard = ({ id, title = "Title Not Found", desc = "Description Not Fou - - ) } diff --git a/components/arcade/showcase/my.module.css b/components/arcade/showcase/my.module.css index 0d5c7780..9ee92f9a 100644 --- a/components/arcade/showcase/my.module.css +++ b/components/arcade/showcase/my.module.css @@ -27,3 +27,39 @@ .title{ margin-top: 200px; } + + +.container { + display: flex; + align-items: center; + justify-content: center; /* Center the title horizontally */ +} + +.title-text { + font-size: 24px; + font-weight: bold; + color: #000; +} + +.timer_box { + display: flex; + flex-direction: column; + align-items: center; + background-color: #f0f0f0; + border: 1px solid #ccc; + padding: 8px 16px; + border-radius: 8px; + margin-left: 16px; /* Space between the title and countdown box */ +} + +.timer_text { + margin-bottom: 8px; + font-size: 16px; + color: #333; +} + +.countdown { + font-size: 24px; + font-weight: bold; + color: #000; +} \ No newline at end of file diff --git a/package.json b/package.json index 3f2f4269..24ac1b1b 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "pcb-stackup": "^4.2.8", "react": "^17.0.2", "react-before-after-slider-component": "^1.1.8", + "react-countdown": "^2.3.6", "react-datepicker": "^4.24.0", "react-dom": "^17.0.2", "react-horizontal-scrolling-menu": "^6.0.2", diff --git a/pages/api/arcade/showcase/projects/[projectID].js b/pages/api/arcade/showcase/projects/[projectID].js index 803cbe3a..87ce82ab 100644 --- a/pages/api/arcade/showcase/projects/[projectID].js +++ b/pages/api/arcade/showcase/projects/[projectID].js @@ -1,6 +1,7 @@ import AirtablePlus from "airtable-plus"; import { ensureAuthed } from "../login/test"; + export default async function handler(req, res) { const user = await ensureAuthed(req) if (user.error) { @@ -28,7 +29,7 @@ export default async function handler(req, res) { codeLink: p.fields['Code Link'] || '', slackLink: p.fields['Slack Link'] || '', playLink: p.fields['Play Link'] || '', - images: p.fields['Screenshot'].map(i => i.url) || [], + images: (p.fields['Screenshot'] || []).map(i => i.url), githubProf: p.fields['Github Profile'] || '' })) return res.status(200).json({ project: results[0] }) diff --git a/pages/arcade/showcase/my.js b/pages/arcade/showcase/my.js index 98d31b7f..cc65a93a 100644 --- a/pages/arcade/showcase/my.js +++ b/pages/arcade/showcase/my.js @@ -4,13 +4,15 @@ import ProjectView from '../../../components/arcade/showcase/project-view' import Nav from '../../../components/Nav' import Footer from '../../../components/arcade/Footer' import BGImg from '../../../components/background-image' -import background from '../../../public/arcade/subtle-stripes.svg' +import background from '../../../public/arcade/background-pattern.png' import { Button, Heading, Text } from 'theme-ui' import SlideDown from '../../../components/slide-down' import styles from '../../../components/arcade/showcase/my.module.css' +import Countdown from 'react-countdown'; + + const ProjectGallery = ({ projects }) => { - console.log("projects", projects); return (
@@ -39,6 +41,8 @@ const my = () => { const [projects, setProjects] = useState([]) const [status, setStatus] = useState('loading') const [errorMsg, setError] = useState(null) + const launchDate = new Date(2024, 7, 19, 0, 0, 0, 0); + useEffect(async () => { const token = window.localStorage.getItem('arcade.authToken') const response = await fetch('/api/arcade/showcase/projects/my', { @@ -85,17 +89,24 @@ const my = () => { zIndex: 1 }} > +
+ + My Ships + +
+

First Voting round in

+ +
+ +
- - My Ships -