Fix some react hook form based prop types

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-03 14:20:24 +04:00
parent 21d2246f30
commit f3d45623bd
6 changed files with 56 additions and 59 deletions

View File

@@ -53,9 +53,6 @@ export default function AssetDetailsPage(props: Props) {
const { snapshotId } = useParams<{ snapshotId?: string }>();
const isSnapshotMode = Boolean(snapshotId);
const { isAuthorized } = use(PermissionsContext);
if (!assetEntry || !assetEntry.id) {
return <div>{__("Asset not found")}</div>;
}
validateSnapshotConsistency(assetEntry, snapshotId);
@@ -82,6 +79,10 @@ export default function AssetDetailsPage(props: Props) {
const updateAsset = useUpdateAsset();
if (!assetEntry || !assetEntry.id) {
return <div>{__("Asset not found")}</div>;
}
const onSubmit = handleSubmit(async (formData) => {
await updateAsset({
id: assetEntry.id!,