This card is shown by default for students but is only visible if there are exams in the next 30 days.
If there are not exams, the card is completely hidden.
π€ Generated by Copilot at 9fefd5c
Summary
ποΈππ
Added a new feature to show upcoming exams from the exams platform on the dashboard and the calendar page. Implemented a new ExamsCard component to display the exams on the dashboard, and added a focus query parameter to the calendar page to select the default tab. Added translations for the new texts in German and English.
The dashboard has a new ExamsCardTo show you the tests that are not hardIt uses some hooksAnd translation booksAnd links to the calendar with a guard
Import the ExamsCard component from cards folder in allCards.js (link)
Register the exams object in the ALL_DASHBOARD_CARDS array in allCards.js with key, removable status, default platforms and user kinds, and card rendering function (link)
Implement the ExamsCard component in cards/ExamsCard.js using various hooks and modules to fetch, filter, and format the exam data, and render the card layout with a list group and a link to the calendar page (link)
Add the exam and exams keys and values to the German and English translation files for the dashboard namespace to provide the translation for the card title and the exam events prefix (link, link)
Use the t function to translate the calendar.exam key for the name of the exam events in the CalendarCard component (link)
Extract the focus query parameter from the router object in the calendar page and assign the page variable to 1 if the focus is exams, or 0 otherwise (link)
Pass the defaultPage prop to the SwipeableTabs component in the calendar page with the value of the page variable to show the appropriate tab by default based on the focus query parameter (link)
Add the exams key and value to the German and English translation files for the common namespace to provide the translation for the tab title (link, link)
Enable the SwipeableTabs component to react to changes in the defaultPage prop (link, link, link)
Import the useEffect hook from React in SwipeableTabs.js (link)
Add the defaultPage prop to the SwipeableTabs component to allow the parent component to specify which tab should be shown by default (link)
Add the defaultPage prop to the prop types validation of the SwipeableTabs component to ensure type safety and documentation (link)
This card is shown by default for students but is only visible if there are exams in the next 30 days. If there are not exams, the card is completely hidden.
π€ Generated by Copilot at 9fefd5c
Summary
ποΈππ
Added a new feature to show upcoming exams from the
exams
platform on the dashboard and the calendar page. Implemented a newExamsCard
component to display the exams on the dashboard, and added afocus
query parameter to the calendar page to select the default tab. Added translations for the new texts in German and English.Walkthrough
ExamsCard
component fromcards
folder inallCards.js
(link)exams
object in theALL_DASHBOARD_CARDS
array inallCards.js
with key, removable status, default platforms and user kinds, and card rendering function (link)ExamsCard
component incards/ExamsCard.js
using various hooks and modules to fetch, filter, and format the exam data, and render the card layout with a list group and a link to the calendar page (link)exam
andexams
keys and values to the German and English translation files for thedashboard
namespace to provide the translation for the card title and the exam events prefix (link, link)t
function to translate thecalendar.exam
key for the name of the exam events in theCalendarCard
component (link)focus
query parameter from therouter
object in thecalendar
page and assign thepage
variable to 1 if thefocus
isexams
, or 0 otherwise (link)defaultPage
prop to theSwipeableTabs
component in thecalendar
page with the value of thepage
variable to show the appropriate tab by default based on thefocus
query parameter (link)exams
key and value to the German and English translation files for thecommon
namespace to provide the translation for the tab title (link, link)SwipeableTabs
component to react to changes in thedefaultPage
prop (link, link, link)useEffect
hook from React inSwipeableTabs.js
(link)defaultPage
prop to theSwipeableTabs
component to allow the parent component to specify which tab should be shown by default (link)defaultPage
prop to the prop types validation of theSwipeableTabs
component to ensure type safety and documentation (link)