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:
23
node_modules/astro/dist/vite-plugin-astro/query.js
generated
vendored
Normal file
23
node_modules/astro/dist/vite-plugin-astro/query.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
function parseAstroRequest(id) {
|
||||
const [filename, rawQuery] = id.split(`?`, 2);
|
||||
const query = Object.fromEntries(new URLSearchParams(rawQuery).entries());
|
||||
if (query.astro != null) {
|
||||
query.astro = true;
|
||||
}
|
||||
if (query.src != null) {
|
||||
query.src = true;
|
||||
}
|
||||
if (query.index != null) {
|
||||
query.index = Number(query.index);
|
||||
}
|
||||
if (query.raw != null) {
|
||||
query.raw = true;
|
||||
}
|
||||
return {
|
||||
filename,
|
||||
query
|
||||
};
|
||||
}
|
||||
export {
|
||||
parseAstroRequest
|
||||
};
|
Reference in New Issue
Block a user