mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-20 23:21:36 +03:00
app_store UI: reload our_apps after publishing a new one
This commit is contained in:
parent
cdd04f12f9
commit
825e04ea2b
@ -41,6 +41,18 @@ export default function PublishPage() {
|
||||
}
|
||||
}, [packageName, publisherId, fetchDownloadsForApp]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isConfirmed) {
|
||||
// Fetch our apps again after successful publish
|
||||
fetchOurApps();
|
||||
// Reset form fields
|
||||
setPackageName("");
|
||||
setPublisherId(window.our?.node || "");
|
||||
setMetadataUrl("");
|
||||
setMetadataHash("");
|
||||
}
|
||||
}, [isConfirmed, fetchOurApps]);
|
||||
|
||||
const validatePackageName = useCallback((name: string) => {
|
||||
// Allow lowercase letters, numbers, hyphens, and dots
|
||||
const validNameRegex = /^[a-z0-9.-]+$/;
|
||||
@ -173,12 +185,6 @@ export default function PublishPage() {
|
||||
gas: BigInt(1000000),
|
||||
});
|
||||
|
||||
// Reset form fields
|
||||
setPackageName("");
|
||||
setPublisherId(window.our?.node || "");
|
||||
setMetadataUrl("");
|
||||
setMetadataHash("");
|
||||
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user