CEC-5436: add configure component (#491)

* CEC-5436: add configure component

* fix deps

* linter

* remove console log

* remove logging
This commit is contained in:
Tristan Timblin
2023-12-12 12:03:10 -08:00
committed by GitHub
parent 858edca5f5
commit ec7607e733
5 changed files with 339 additions and 106 deletions

View File

@@ -83,10 +83,10 @@ export const ManifestsProvider = ({ children }) => {
const migrateManifest = async (package_id, token) => {
let result;
try{
try {
setBusy(true)
result = await api.migrateManifest(package_id, token)
if(result.error)
if (result.error)
throw new Error(`failed to migrate manifest. ${result.message}`);
} finally {
setBusy(false)
@@ -116,7 +116,7 @@ export const ManifestsProvider = ({ children }) => {
const validateManifestUpdate = (data) => {
if (data == null) throw new Error("No manifest data");
if (data.name == null || data.name.length>255) throw new Error("Invalid manifest name");
if (data.name == null || data.name.length > 255) throw new Error("Invalid manifest name");
if (data.type == null || !["forced", "standard"].includes(data.type)) {
throw new Error("Invalid manifest type");