Forward query params while redirecting to /home or /file
This commit is contained in:
@ -174,11 +174,14 @@ export const fileLoader: LoaderFunction = async (
|
||||
|
||||
// Loads the settings and by extension the projects in the default directory
|
||||
// and returns them to the Home route, along with any errors that occurred
|
||||
export const homeLoader: LoaderFunction = async (): Promise<
|
||||
HomeLoaderData | Response
|
||||
> => {
|
||||
export const homeLoader: LoaderFunction = async ({
|
||||
request,
|
||||
}): Promise<HomeLoaderData | Response> => {
|
||||
const url = new URL(request.url)
|
||||
if (!isDesktop()) {
|
||||
return redirect(PATHS.FILE + '/%2F' + BROWSER_PROJECT_NAME)
|
||||
return redirect(
|
||||
PATHS.FILE + '/%2F' + BROWSER_PROJECT_NAME + (url.search || '')
|
||||
)
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user