Add ExportBtn to settings
This commit is contained in:
@@ -9,12 +9,13 @@ export default function ExportCalendarBtn() {
|
|||||||
const calendarUrl = `${import.meta.env.VITE_API_URL}/api/export/ics/${user?.id}`;
|
const calendarUrl = `${import.meta.env.VITE_API_URL}/api/export/ics/${user?.id}`;
|
||||||
|
|
||||||
return <Button
|
return <Button
|
||||||
|
variant="default"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.open(
|
window.open(
|
||||||
`${APP_CONFIG.newCalendarURL}${calendarUrl}`
|
`${APP_CONFIG.newCalendarURL}${calendarUrl}`
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Exporter
|
Exporter le calendrier
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import {AuthContext} from "../../../../contexts/Auth/AuthContext";
|
|||||||
import TextInput from "../../../../components/ui/Input/Input";
|
import TextInput from "../../../../components/ui/Input/Input";
|
||||||
import updateUser from "../../../../utils/users/updateUser.js";
|
import updateUser from "../../../../utils/users/updateUser.js";
|
||||||
import deleteUser from "../../../../utils/users/deleteUser.js";
|
import deleteUser from "../../../../utils/users/deleteUser.js";
|
||||||
|
import ExportCalendarBtn from "../../../../components/ExportCalendarBtn/ExportBtn";
|
||||||
|
|
||||||
interface TaskType {
|
interface TaskType {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -130,6 +131,12 @@ export default function SettingsModal() {
|
|||||||
<ThemeSwitcher/>
|
<ThemeSwitcher/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div className={`glassBorder ${styles.section}`}>
|
||||||
|
<h3>Divers</h3>
|
||||||
|
<ExportCalendarBtn />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className={`glassBorder ${styles.section}`}>
|
<div className={`glassBorder ${styles.section}`}>
|
||||||
<h3>Sécurité du compte</h3>
|
<h3>Sécurité du compte</h3>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user