import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import PageHeader from 'components/layout/PageHeader'; import Button from 'components/common/Button'; import ChangePasswordForm from '../forms/ChangePasswordForm'; import Modal from 'components/common/Modal'; import Dots from 'assets/ellipsis-h.svg'; import Toast from '../common/Toast'; export default function ProfileSettings() { const user = useSelector(state => state.user); const [changePassword, setChangePassword] = useState(false); const [message, setMessage] = useState(); const { user_id } = user; function handleSave() { setChangePassword(false); setMessage('Saved successfully.'); } return ( <>
Profile
Username
{user.username}
{changePassword && ( setChangePassword(false)} /> )} {message && setMessage(null)} />} ); }