🐛 Fix wrong update way of data

This commit is contained in:
2025-12-12 00:13:26 +08:00
parent 580663dcda
commit 2297fb3c47
2 changed files with 6 additions and 12 deletions

View File

@@ -169,12 +169,11 @@ class PageForm extends HookConsumerWidget {
isLoading.value = true;
try {
final pagesNotifier = ref.read(
sitePagesNotifierProvider((
pubName: pubName,
siteSlug: site.slug,
)).notifier,
);
final provider = sitePagesNotifierProvider((
pubName: pubName,
siteSlug: site.slug,
));
final pagesNotifier = ref.read(provider.notifier);
late final Map<String, dynamic> pageData;
@@ -227,6 +226,7 @@ class PageForm extends HookConsumerWidget {
// Update existing page
await pagesNotifier.updatePage(page!.id, pageData);
}
ref.invalidate(provider);
if (context.mounted) {
showSnackBar(