From 929271fe48c52e76df13094a8d8caf05e53f9409 Mon Sep 17 00:00:00 2001 From: Maxh <44454544+1-max-1@users.noreply.github.com> Date: Wed, 18 Jan 2023 10:32:10 +1300 Subject: [PATCH] Fix 404 redirects --- WASMSerialTerminal/App.razor | 9 ++++++--- WASMSerialTerminal/wwwroot/404.html | 21 +++++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/WASMSerialTerminal/App.razor b/WASMSerialTerminal/App.razor index d104a95..51c44dc 100644 --- a/WASMSerialTerminal/App.razor +++ b/WASMSerialTerminal/App.razor @@ -1,4 +1,6 @@ - +@inject NavigationManager NavManager + + @* If the web serial API is supported, then we can render the regular content *@ @@ -7,9 +9,10 @@ - Not found + @{ NavManager.NavigateTo("", false, true); } + WASM Serial Terminal -

Sorry, there's nothing at this address.

+

Sorry, there's nothing at this address. Redirecting you to the main page...

\ No newline at end of file diff --git a/WASMSerialTerminal/wwwroot/404.html b/WASMSerialTerminal/wwwroot/404.html index 1877878..ebb33fb 100644 --- a/WASMSerialTerminal/wwwroot/404.html +++ b/WASMSerialTerminal/wwwroot/404.html @@ -1,13 +1,14 @@  - - - WASM Serial Terminal - - - - - + + + WASM Serial Terminal + + + + + + \ No newline at end of file