From 9f0d20cd227a1d9d1bb1fd60aaf6d3e42fbd7111 Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Sat, 29 Oct 2022 13:09:27 -0500 Subject: [PATCH] feat: redirect invalid routes to root --- src/Bootstrap.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Bootstrap.tsx b/src/Bootstrap.tsx index 8416a95..689936a 100644 --- a/src/Bootstrap.tsx +++ b/src/Bootstrap.tsx @@ -1,5 +1,10 @@ import { useEffect, useState } from 'react' -import { BrowserRouter as Router, Routes, Route } from 'react-router-dom' +import { + BrowserRouter as Router, + Routes, + Route, + Navigate, +} from 'react-router-dom' import { v4 as uuid } from 'uuid' import localforage from 'localforage' @@ -119,6 +124,10 @@ function Bootstrap({ path={routes.PRIVATE_ROOM} element={} /> + } + /> ) : ( <>