Skip to content

Commit

Permalink
cooking somethig
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoblaise committed Apr 7, 2024
1 parent 070a63e commit d0d1e23
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 24 deletions.
35 changes: 19 additions & 16 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
'use client';
import { Awards } from '@/components/awards';
import Image from 'next/image';
import Link from 'next/link';

import { useEffect, useState } from 'react';

function Home() {
const [days, setDays] = useState(0);
const [hours, setHours] = useState(0);
useEffect(() => {
const target = new Date('7/28/2024 23:59:59');
const interval = setInterval(() => {
const now = new Date();
const difference = target.getTime() - now.getTime();
const d = Math.floor(difference / (1000 * 60 * 60 * 24));
setDays(d);
const h = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
setHours(h);
}, 1000);
return () => clearInterval(interval);
}, []);
// const [days, setDays] = useState(0);
// const [hours, setHours] = useState(0);
// useEffect(() => {
// const target = new Date('7/28/2024 23:59:59');
// const interval = setInterval(() => {
// const now = new Date();
// const difference = target.getTime() - now.getTime();
// const d = Math.floor(difference / (1000 * 60 * 60 * 24));
// setDays(d);
// const h = Math.floor(difference / (1000 * 60 * 60 * 24 * 30));
// setHours(h);
// console.log(h);
// }, 1000);
// return () => clearInterval(interval);
// }, []);

return (
<div className="page">
<header>
Expand Down Expand Up @@ -90,7 +93,7 @@ function Home() {
className="blob green"
aria-hidden="true"
></div>
<h2 id="header-subtitle-spots">84 spots remaining</h2>
<h2 id="header-subtitle-spots"> Venue TBC</h2>
</div>
</div>
</main>
Expand Down Expand Up @@ -401,7 +404,7 @@ function Home() {
</div>
</div>
</div>

<Awards />
<hr id="line-header" />
<div className="sponsors">
<div className="sponsors2">Sponsors</div>
Expand Down
52 changes: 45 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
},
"dependencies": {
"@next/font": "13.1.2",
"@tabler/icons-react": "^3.1.0",
"@types/node": "18.11.18",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
"clsx": "^2.1.0",
"eslint": "8.31.0",
"eslint-config-next": "13.1.2",
"framer-motion": "^11.0.24",
"framer-motion": "^11.0.25",
"gray-matter": "^4.0.3",
"markdown-to-jsx": "^7.1.9",
"mini-svg-data-uri": "^1.4.4",
Expand Down

0 comments on commit d0d1e23

Please sign in to comment.