summaryrefslogtreecommitdiffstats
path: root/assets/js/not-found-page.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/not-found-page.js')
-rw-r--r--assets/js/not-found-page.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/assets/js/not-found-page.js b/assets/js/not-found-page.js
new file mode 100644
index 0000000..2b4f676
--- /dev/null
+++ b/assets/js/not-found-page.js
@@ -0,0 +1,9 @@
+// 404 page: initialize shared notFoundPage Alpine component
+document.addEventListener('alpine:init', () => {
+ // Ensure search index is preloaded on 404 page
+ const notFoundElement = document.querySelector('[x-data*="notFoundPage"]');
+ if (notFoundElement && notFoundElement.__x) {
+ notFoundElement.__x.$data.init();
+ }
+ console.log('404 page initialized with shared search functionality');
+});