CEC-4126-update-manifest-migrate-button (#320)
* CEC-4126-update-manifest-migrate-button * remove comment --------- Co-authored-by: John Wu <76966357+jwu-fisker@users.noreply.github.com>
This commit is contained in:
@@ -80,12 +80,28 @@ export const ManifestsProvider = ({ children }) => {
|
||||
return result;
|
||||
};
|
||||
|
||||
const migrateManifest = async (package_id, token) => {
|
||||
let result;
|
||||
|
||||
try{
|
||||
setBusy(true)
|
||||
result = await api.migrateManifest(package_id, token)
|
||||
if(result.error)
|
||||
throw new Error(`failed to migrate manifest. ${result.message}`);
|
||||
} finally {
|
||||
setBusy(false)
|
||||
}
|
||||
return result
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
<ManifestsContext.Provider
|
||||
value={{
|
||||
busy,
|
||||
manifests,
|
||||
totalManifests,
|
||||
migrateManifest,
|
||||
updateManifest,
|
||||
getManifest,
|
||||
getManifests,
|
||||
|
||||
Reference in New Issue
Block a user