Skip to content

Commit

Permalink
Parameterize a few more hardcoded years
Browse files Browse the repository at this point in the history
  • Loading branch information
lazerwalker committed Sep 26, 2024
1 parent e46327c commit d2f66b6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<link rel="icon" type="image/x-icon" href="favicon.png">
<title>Roguelike Celebration 2024</title>
<title>Roguelike Celebration</title>

<link rel="stylesheet" type="text/css" href="style/style.css" />
<script src="src/index.tsx" type="module"></script>
Expand Down
3 changes: 2 additions & 1 deletion server/src/endpoints/toggleSpeakerStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { UnlockableBadgeMap } from '../badges'

const toggleSpeakerStatus: AuthenticatedEndpointFunction = async (user: User, inputs: any, log: LogFn) => {
const userIdToToggle: string = inputs.userId
const isForPastYear = inputs.year !== '2024'
const thisYear: string = `${(new Date()).getFullYear()}`
const isForPastYear = inputs.year !== thisYear

if (!userIdToToggle) {
return {
Expand Down
4 changes: 3 additions & 1 deletion src/components/GoHomeView.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react'

export default function GoHomeView () {
const thisYear: string = `${(new Date()).getFullYear()}`

return (
<div id='go-home'>
<h1>A magical force repels you from the entrance</h1>
<p>Roguelike Celebration is currently closed! Check the <a href="https://roguelike.club/event2024.html" target="_blank" rel="noreferrer">schedule</a> to see when our doors will be open again.</p>
<p>Roguelike Celebration is currently closed! Check the <a href={`https://roguelike.club/event${thisYear}.html`} target="_blank" rel="noreferrer">schedule</a> to see when our doors will be open again.</p>
<p>We look forward to celebrating again with you soon :)</p>
</div>
)
Expand Down
4 changes: 3 additions & 1 deletion src/components/LoggedOutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ const uiConfig = {
}

export default function LoggedOutView () {
const thisYear: string = `${(new Date()).getFullYear()}`

return (
<div>
<header role="banner">
<h1>Welcome to Roguelike Celebration 2024!</h1>
<h1>Welcome to Roguelike Celebration {thisYear}!</h1>
</header>
<main role="main">
<p>
Expand Down

0 comments on commit d2f66b6

Please sign in to comment.