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