// import { _userList } from 'src/_mock/_user';
import { CONFIG } from 'src/global-config';
import { useParams } from 'src/routes/hooks';
import { UserEditView } from 'src/sections/user/view';
import { useGetUser } from 'src/actions/user';

// ----------------------------------------------------------------------

const metadata = { title: `User edit | Dashboard - ${CONFIG.appName}` };

export default function Page() {
  const { id = '' } = useParams();

  // TODO: remove me
  // const currentUser = _userList.find((user) => user.id === id);
  const { user } = useGetUser(id);

  return (
    <>
      <title>{metadata.title}</title>

      <UserEditView user={user} />
    </>
  );
}
