Create ExportBtn component + Change calendar adding url
This commit is contained in:
1 parent
d6f69fa4a5
commit
76bf6384f5
3 files changed
+23
-12
No files matched your search
@@ -3,13 +3,12 @@ import styles from "./Calendar.module.css";
|
||||
import {formatDateLetterJS} from "../../../../utils/date/formatDateLetter.js";
|
||||
import Button from "../../../../components/ui/Button/Button";
|
||||
import {AuthContext} from "../../../../contexts/Auth/AuthContext.ts";
|
||||
import ExportBtn from "./ExportBtn.tsx";
|
||||
|
||||
function
|
||||
Calendar() {
|
||||
const { user } = useContext(AuthContext);
|
||||
|
||||
const calendarUrl = `${import.meta.env.VITE_API_URL}/api/export/ics/${user.id}`;
|
||||
|
||||
const monthNames = [
|
||||
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
|
||||
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
|
||||
@@ -152,16 +151,7 @@ Calendar() {
|
||||
</div>
|
||||
)}
|
||||
<div className={`${styles.exportbox} glassBorder`}>
|
||||
<p><b>votre lien d'agenda:</b> {calendarUrl}</p>
|
||||
<Button className={styles.exportbtn}
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"https://calendar.google.com/calendar/u/0/r/settings/addbyurl"
|
||||
);
|
||||
}}
|
||||
>
|
||||
Exporter
|
||||
</Button>
|
||||
<ExportBtn />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user