// Copyright (C) 2022-present Daniel31x13 // This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3. // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // You should have received a copy of the GNU General Public License along with this program. If not, see . import { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCircleUser, faClose } from "@fortawesome/free-solid-svg-icons"; import Checkbox from "../Checkbox"; import useAccountStore from "@/store/account"; type Props = { toggleSettingsModal: Function; }; export default function UserSettings({ toggleSettingsModal }: Props) { const { account } = useAccountStore(); const [collectionProtection, setCollectionProtection] = useState(false); const [name, setName] = useState(account.name); const [email, setEmail] = useState(account.email); const [selectedFile, setSelectedFile] = useState(null); const handleFileChange = async (e) => { const file = e.target.files[0]; setSelectedFile(file); }; const submit = async () => { // const response = await addLink(newLink as NewLink); // if (response) toggleSettingsModal(); }; return (

Settings

Profile Settings

Display Name

setName(e.target.value)} className="w-full rounded-md p-2 border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100" />

Email

setEmail(e.target.value)} className="w-full rounded-md p-2 border-sky-100 border-solid border outline-none focus:border-sky-500 duration-100" />

Password

Change Password

Profile Photo

{/* Image goes here */}

Data Settings

Export Data

Privacy Settings

setCollectionProtection(!collectionProtection)} />
Manage Allowed Users
Apply Settings
); }