1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 21:14:18 +00:00
pds-2021-g2-nest/code/frontend/src/routes/PageSettings.js

47 lines
1.7 KiB
JavaScript
Raw Normal View History

import React, { useContext } from "react"
2021-04-21 16:21:30 +00:00
import Style from "./PageSettings.module.css"
import classNames from "classnames"
2021-04-23 00:24:38 +00:00
import BoxHeader from "../components/BoxHeader"
2021-04-23 00:26:16 +00:00
import BoxFull from "../components/BoxFull"
2021-04-21 16:58:14 +00:00
import SelectTheme from "../components/SelectTheme"
import ContextLogin from "../contexts/ContextLogin"
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
import { faSignOutAlt, faUser } from "@fortawesome/free-solid-svg-icons"
import Button from "../components/Button"
import LoggedInUser from "../components/LoggedInUser"
import { useHistory } from "react-router"
2021-04-21 16:21:30 +00:00
export default function PageSettings({ children, className, ...props }) {
const {logout} = useContext(ContextLogin)
const history = useHistory()
2021-04-21 16:21:30 +00:00
return (
<div className={classNames(Style.PageSettings, className)} {...props}>
<BoxFull header={"Logged in"}>
<div>
You are currently logged in as <LoggedInUser/>.
</div>
<div>
<Button color={"Red"} onClick={e => {
logout()
history.push("/login")
}} icon={faSignOutAlt}>Logout</Button>
</div>
</BoxFull>
2021-04-23 00:24:38 +00:00
<BoxHeader>
2021-04-21 16:58:14 +00:00
Switch theme: <SelectTheme/>
2021-04-23 00:24:38 +00:00
</BoxHeader>
2021-04-23 00:26:16 +00:00
<BoxFull header={"Alert settings"}>
🚧 Not implemented.
</BoxFull>
<BoxFull header={"Change your email address"}>
🚧 Not implemented.
2021-04-23 00:26:16 +00:00
</BoxFull>
<BoxFull header={"Change your password"}>
🚧 Not implemented.
2021-04-23 00:26:16 +00:00
</BoxFull>
2021-04-21 16:21:30 +00:00
</div>
)
}