blob: df229c7fc7e55ebd84990cf3067e5c7f93a3fdb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
import Layout from '../layouts/Layout.astro';
import TopBar from '../components/TopBar.astro';
import Navbar from '../components/Navbar.astro';
import Footer from '../components/Footer.astro';
import ResultsBody from '../components/ResultsBody.astro';
import IconBar from '../components/IconBar.astro';
// Import your configuration file
import config from '../../config.json';
const resultDate = config.resultDate;
// Calculate current time
const currentDate = new Date();
// Create target time
const targetTime = new Date(resultDate.year, resultDate.month - 1, resultDate.day, resultDate.hours, resultDate.minutes, resultDate.seconds);
console.log("Result date: ", targetTime);
console.log("Current date: ", currentDate);
// Check if current time is past target time
if (currentDate >= targetTime) {
// Redirect if condition met
return Astro.redirect('/announce');
}
---
<Layout title="Welcome to FOSSEE.">
<main>
<TopBar />
<Navbar />
<IconBar />
<ResultsBody />
<Footer />
</main>
</Layout>
|