From 9e24fa9393feeafe484b74d3bcd7e4e005822b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Rodrigues?= <93675410+MarioRodrigues10@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:21:20 +0000 Subject: [PATCH 01/18] fix: "Register here" redirect (#587) --- components/Input/index.tsx | 2 +- components/Select/index.tsx | 4 +++- layout/ForgotPassword/components/ForgotPasswordForm/index.tsx | 2 +- layout/Login/Login.tsx | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/Input/index.tsx b/components/Input/index.tsx index 63eb6798..3f5015a5 100644 --- a/components/Input/index.tsx +++ b/components/Input/index.tsx @@ -34,7 +34,7 @@ export function InputBase({
{props.description}
-- - {index + 1} - {ordinal} place - {props.prizes[index].name} - -
- ); - })} - {props.button != null && ( -{props.description}
++ + {index + 1} + {ordinal} place - {props.prizes[index].name} + +
+ ); + })} + {props.button != null && ( +- This list of frequently asked questions serves to complement the - general rules that you can find below. Get in touch with the - organizing team whenever a question arises and we will add answers - to the most frequently asked questions here. -
-+ This list of frequently asked questions serves to complement the + general rules that you can find below. Get in touch with the + organizing team whenever a question arises and we will add answers + to the most frequently asked questions here. +
+- The SEI is free for participants and is organized by volunteers from + SEI is free for participants and is organized by volunteers from CeSIUM and from the university community.
- ++ This years event will take place at Pedagogic Complex 2, Gualtar + Campus. +
Centro de Estudantes de Engenharia Informática
@@ -30,7 +29,7 @@ export default function FindUs() {{errors}
} diff --git a/layout/Product/Product.tsx b/layout/Product/Product.tsx index 85131df0..7a3c893c 100644 --- a/layout/Product/Product.tsx +++ b/layout/Product/Product.tsx @@ -89,7 +89,7 @@ function ProductSlug() { refetchUser(); }) } - customStyle="m-auto block h-20 w-full rounded-full bg-quinary hover:opacity-75 disabled:bg-gray-400 disabled:opacity-75" + className="m-auto block h-20 w-full rounded-full bg-quinary hover:opacity-75 disabled:bg-gray-400 disabled:opacity-75" disabled={user.token_balance < product.price} title="REDEEM" description={`${product.price} tokens 💰`} diff --git a/layout/ResetPassword/components/ResetPasswordForm/index.tsx b/layout/ResetPassword/components/ResetPasswordForm/index.tsx index 2a942c19..7e64bb43 100644 --- a/layout/ResetPassword/components/ResetPasswordForm/index.tsx +++ b/layout/ResetPassword/components/ResetPasswordForm/index.tsx @@ -97,7 +97,7 @@ export default function ResetPasswordForm() {diff --git a/layout/Staff/components/StaffRedeemButton/index.jsx b/layout/Staff/components/StaffRedeemButton/index.jsx index 094e6d5e..5713a190 100644 --- a/layout/Staff/components/StaffRedeemButton/index.jsx +++ b/layout/Staff/components/StaffRedeemButton/index.jsx @@ -2,10 +2,7 @@ import Button from "@components/Button"; export default function StaffRedeemButton() { return (
From 48d93ef331af19082637cea81d2f9bc441eabd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lobo?= <30907944+joaodiaslobo@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:14:28 +0000 Subject: [PATCH 05/18] feat: fetch event dates from schedule data (#594) --- components/Schedule/index.jsx | 9 +++++++-- layout/Home/components/Hero/Title/index.tsx | 13 ++++++++++++- package-lock.json | 11 +++++++++++ package.json | 1 + 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/components/Schedule/index.jsx b/components/Schedule/index.jsx index 448e6a2a..c37d794f 100644 --- a/components/Schedule/index.jsx +++ b/components/Schedule/index.jsx @@ -4,6 +4,8 @@ import Day from "./Day"; import { useState, useEffect } from "react"; import { useRouter } from "next/router"; +import scheduleData from "/data/schedule.json"; + function leapYear(year) { return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; } @@ -87,8 +89,11 @@ function addDate(date, days) { } export default function Schedule(props) { - const min_date = "2023/2/14"; - const max_date = "2023/2/17"; + /* Fetch first and last day of the event from schedule data */ + const eventDates = scheduleData.map((day) => day.date).sort(); + const min_date = eventDates[0]; + const max_date = eventDates[eventDates.length - 1]; + const defaultFilter = props.filters === undefined ? "" : props.filters; //calculate default date diff --git a/layout/Home/components/Hero/Title/index.tsx b/layout/Home/components/Hero/Title/index.tsx index 747a68c2..cef62ab5 100644 --- a/layout/Home/components/Hero/Title/index.tsx +++ b/layout/Home/components/Hero/Title/index.tsx @@ -1,10 +1,21 @@ import TypeWriter from "typewriter-effect"; +import schedule from "@data/schedule.json"; +import dayjs from "dayjs"; export default function Title() { + /* Parse event dates info from schedule data */ + const dates = schedule.map((day) => day.date).sort(); + + const firstDayDate = dayjs(dates[0], "YYYY/M/D"); + const lastDayDate = dayjs(dates[dates.length - 1], "YYYY/M/D"); + + const month = firstDayDate.format("MMMM"); + const year = firstDayDate.format("YYYY"); + return (