diff --git a/twistter-frontend/src/pages/editProfile.js b/twistter-frontend/src/pages/editProfile.js index 703fa67..539fc8b 100644 --- a/twistter-frontend/src/pages/editProfile.js +++ b/twistter-frontend/src/pages/editProfile.js @@ -1,14 +1,16 @@ import React, { Component } from "react"; +import { Link } from 'react-router-dom'; import axios from "axios"; import PropTypes from "prop-types"; // TODO: Add a read-only '@' in the left side of the handle input // TODO: Add a cancel button, that takes the user back to their profile page // Material-UI stuff +import Box from "@material-ui/core/Box" import Button from "@material-ui/core/Button"; -import { Link } from 'react-router-dom'; import CircularProgress from "@material-ui/core/CircularProgress"; import Grid from "@material-ui/core/Grid"; +import Popover from "@material-ui/core/Popover"; import TextField from "@material-ui/core/TextField"; import Typography from "@material-ui/core/Typography"; import withStyles from "@material-ui/core/styles/withStyles"; @@ -38,6 +40,14 @@ const styles = { }, progress: { position: "absolute" + }, + popoverBackground: { + marginTop: "-100px", + width: "calc(100vw)", + height: 'calc(100vh + 100px)', + backgroundColor: "gray", + position: "absolute", + opacity: "70%" } }; @@ -77,6 +87,7 @@ export class editProfile extends Component { email: "", handle: "", bio: "", + anchorEl: null, loading: false, errors: {} }; @@ -137,12 +148,30 @@ export class editProfile extends Component { }); }; + handleOpenConfirmDelete = (event) => { + this.setState({ + // anchorEl: event.currentTarget + anchorEl: document.getElementById("container-grid") + }); + }; + + handleCloseConfirmDelete = () => { + this.setState({ + anchorEl: null, + createDMUsername: '' + }); + }; + render() { const { classes } = this.props; const { errors, loading } = this.state; + // Used for the delete button + const open = Boolean(this.state.anchorEl); + const id = open ? 'simple-popover' : undefined; + return ( - + + + + + + + + Are you sure you want to delete your account? + + + + + + + + ); }