ajout bouton export auto

This commit is contained in:
ORDONNEAU Antoine committed 2026-03-12 09:55:44 +01:00
1 parent fb7152bf21
commit 1948ddab21
2 files changed
+24 -9

No files matched your search

@@ -7,9 +7,9 @@ import {AuthContext} from "../../../../contexts/auth/AuthContext.ts";
function function
Calendar() { Calendar() {
const { user } = useContext(AuthContext); const { user } = useContext(AuthContext);
const calendarUrl = `http://localhost/api/export/ics/${user.id}`;
const monthNames = [ const monthNames = [
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
@@ -130,15 +130,18 @@ Calendar() {
)} )}
</div> </div>
)} )}
<Button className={styles.exportbtn} <div className={`${styles.exportbox} glassBorder`}>
variant={"primary"} <p><b>votre lien d'agenda:</b> {calendarUrl}</p>
<Button className={styles.exportbtn}
onClick={() => { onClick={() => {
window.location.href = window.open(
`http://localhost/api/export/ics/${user.id}`; "https://calendar.google.com/calendar/u/0/r/settings/addbyurl"
);
}} }}
> >
Exporter mon agenda Exporter
</Button> </Button>
</div>
</div> </div>
</div> </div>
); );
@@ -150,10 +150,22 @@
display: none; display: none;
} }
.exportbtn{ .exportbox{
width: 100%;
padding: 15px;
margin-top: 16px; margin-top: 16px;
display: flex;
align-items: center;
} }
.exportbtn {
display: flex;
align-items: center;
max-height: 30px;
}
@media (max-width: 768px) { @media (max-width: 768px) {
.glassCard { .glassCard {
width: 100%; width: 100%;