-
Notifications
You must be signed in to change notification settings - Fork 0
Add support for image block in tutorial information page #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bbc0e95 to
4946f6c
Compare
4946f6c to
3a4c238
Compare
| const result = await createTutorialAsset({ | ||
| data: { | ||
| clientId: ulid(), | ||
| file, | ||
| mimetype: selectedEnum, | ||
| tutorial: tutorialId, | ||
| }, | ||
| }); | ||
|
|
||
| if ( | ||
| // eslint-disable-next-line no-underscore-dangle | ||
| result.data?.createTutorialAsset.__typename === 'TutorialAssetTypeMutationResponseType' | ||
| && result.data.createTutorialAsset.ok | ||
| && result.data.createTutorialAsset.result | ||
| ) { | ||
| onChange(result.data.createTutorialAsset.result.id, name); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's handle error
| const geoJsonResponse = await fetch( | ||
| previewResponse.tutorialAsset.file.url, | ||
| ); | ||
|
|
||
| const rawGeoJson = await geoJsonResponse.json(); | ||
|
|
||
| // TODO: validate | ||
| setGeoJson(rawGeoJson); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's handle error
| validate: { | ||
| objectGeometry: JSON.stringify(feature.geometry, null, 4), | ||
| } satisfies ValidatePropertyInputFields, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objectGeometry is string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added FIXME for now.
Depends on