Fix build errors

This commit is contained in:
Darren Clarke 2023-03-14 17:40:24 +00:00
parent 785d0965e3
commit d0f1c1337c
28 changed files with 268 additions and 112 deletions

View file

@ -9,7 +9,7 @@ import {
import { useSession } from "next-auth/react";
import { UserRoleInput } from "./shared";
const UserCreate: FC<CreateProps> = (props) => {
const UserCreate: FC<CreateProps> = (props: any) => {
const { data: session } = useSession();
return (
<Create {...props} title="Create Users">
@ -18,7 +18,7 @@ const UserCreate: FC<CreateProps> = (props) => {
<TextInput source="name" />
<UserRoleInput session={session} initialValue="NONE" />
<BooleanInput source="isActive" defaultValue={true} />
<TextInput source="createdBy" defaultValue={session.user.name} />
<TextInput source="createdBy" defaultValue={session?.user?.name} />
</SimpleForm>
</Create>
);