Refactor routing in App component to enhance navigation and improve error handling by integrating dynamic routes and updating the NotFound route.
This commit is contained in:
25
node_modules/astro/dist/runtime/client/visible.js
generated
vendored
Normal file
25
node_modules/astro/dist/runtime/client/visible.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
const visibleDirective = (load, options, el) => {
|
||||
const cb = async () => {
|
||||
const hydrate = await load();
|
||||
await hydrate();
|
||||
};
|
||||
const rawOptions = typeof options.value === "object" ? options.value : void 0;
|
||||
const ioOptions = {
|
||||
rootMargin: rawOptions?.rootMargin
|
||||
};
|
||||
const io = new IntersectionObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
if (!entry.isIntersecting) continue;
|
||||
io.disconnect();
|
||||
cb();
|
||||
break;
|
||||
}
|
||||
}, ioOptions);
|
||||
for (const child of el.children) {
|
||||
io.observe(child);
|
||||
}
|
||||
};
|
||||
var visible_default = visibleDirective;
|
||||
export {
|
||||
visible_default as default
|
||||
};
|
Reference in New Issue
Block a user