-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds week veiw calendar to home page. Still needs to be styled
- Loading branch information
Stephen Swanson
authored and
Stephen Swanson
committed
Aug 29, 2024
1 parent
b55f0f8
commit 2c722f3
Showing
6 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
// remove this later^ | ||
import { useLanguage } from "@/lib/LanguageContext"; | ||
import enLocale from "@fullcalendar/core/locales/en-gb"; | ||
import fiLocale from "@fullcalendar/core/locales/fi"; | ||
import svLocale from "@fullcalendar/core/locales/sv"; | ||
import FullCalendar from "@fullcalendar/react"; | ||
import dayGridPlugin from "@fullcalendar/timegrid"; | ||
|
||
const WeekCalendar = () => { | ||
const { language } = useLanguage(); | ||
const localeMap = { | ||
fi: fiLocale, | ||
sv: svLocale, | ||
en: enLocale, | ||
}; | ||
const currentLocale = localeMap[language] || enLocale; | ||
return ( | ||
<> | ||
<FullCalendar | ||
schedulerLicenseKey={process.env.FULL_CALENDAR_KEY} | ||
plugins={[dayGridPlugin]} | ||
initialView="timeGridWeek" | ||
locale={currentLocale} | ||
/> | ||
<div /> | ||
</> | ||
); | ||
}; | ||
|
||
export default WeekCalendar; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ dd { | |
|
||
/* Month calendar */ | ||
.fc { | ||
width: 70%; | ||
width: 100%; | ||
height: auto; | ||
} | ||
|
||
|