fixing load item

This commit is contained in:
rizky 2024-08-13 01:46:42 -07:00
parent 403ea83de2
commit 87414b839a
1 changed files with 3 additions and 3 deletions

View File

@ -19,13 +19,13 @@ export const Profile: FC<PFTypes> = ({
const local = useLocal( const local = useLocal(
{ {
item: {} as any, item: {} as any,
}, },
async () => { async () => {
if (!isEditor) { if (!isEditor) {
const item = await on_load({ const item = await on_load({
params: {}, params: {},
}); });
local.item = item;
local.render(); local.render();
} else { } else {
local.item = detail({}); local.item = detail({});
@ -43,7 +43,7 @@ export const Profile: FC<PFTypes> = ({
on_load, on_load,
detail, detail,
on_update, on_update,
internal: local internal: local,
}} }}
> >
{child} {child}