use event context in calendar component
This commit is contained in:
1 parent
31729986e1
commit
7b84efde42
2 files changed
+7
-15
No files matched your search
@@ -1,8 +1,11 @@
|
||||
import { useState, useMemo, useEffect } from "react";
|
||||
import {useState, useMemo, useEffect, useContext} from "react";
|
||||
import styles from "./calendar.module.css";
|
||||
import { formatDateLetterJS } from "../../../../utils/date/formatDateLetter.js";
|
||||
import {EventContext} from "../../../../contexts/events/EventContext.js";
|
||||
|
||||
function Calendar({ events = [] }) {
|
||||
function Calendar() {
|
||||
|
||||
const { events } = useContext(EventContext);
|
||||
|
||||
const monthNames = [
|
||||
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
|
||||
|
||||
Reference in new issue
Block a user