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