import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import PageHeader from './layout/PageHeader'; import Button from './common/Button'; import ChangePasswordForm from './forms/ChangePasswordForm'; import Modal from './common/Modal'; export default function ProfileSettings() { const user = useSelector(state => state.user); const [changePassword, setChangePassword] = useState(false); const { user_id } = user; return ( <>
Profile
Username
{user.username}
{changePassword && ( setChangePassword(false)} onClose={() => setChangePassword(false)} /> )} ); }