Fix some react hook form based prop types
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -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!,
|
||||
|
||||
Reference in New Issue
Block a user