diff --git a/admin-spa/src/App.tsx b/admin-spa/src/App.tsx
index fc932e2..ebe74bc 100644
--- a/admin-spa/src/App.tsx
+++ b/admin-spa/src/App.tsx
@@ -257,9 +257,21 @@ function AddonRoute({ config }: { config: any }) {
}
function Header({ onFullscreen, fullscreen, showToggle = true }: { onFullscreen: () => void; fullscreen: boolean; showToggle?: boolean }) {
- const siteTitle = (window as any).wnw?.siteTitle || 'WooNooW';
+ const [siteTitle, setSiteTitle] = React.useState((window as any).wnw?.siteTitle || 'WooNooW');
const isStandalone = window.WNW_CONFIG?.standaloneMode ?? false;
+ // Listen for store settings updates
+ React.useEffect(() => {
+ const handleStoreUpdate = (event: CustomEvent) => {
+ if (event.detail?.store_name) {
+ setSiteTitle(event.detail.store_name);
+ }
+ };
+
+ window.addEventListener('woonoow:store:updated' as any, handleStoreUpdate);
+ return () => window.removeEventListener('woonoow:store:updated' as any, handleStoreUpdate);
+ }, []);
+
const handleLogout = async () => {
try {
await fetch((window.WNW_CONFIG?.restUrl || '') + '/auth/logout', {
@@ -406,7 +418,7 @@ function Shell() {
{isDashboardRoute ? (