Skip to content

Commit

Permalink
chore; rename public route to home route
Browse files Browse the repository at this point in the history
References: #51

Signed-off-by: Prince Muel <[email protected]>
  • Loading branch information
princemuel committed Apr 24, 2023
1 parent 7876d50 commit ddfce80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ import {
Route,
} from 'react-router-dom';
import { LoginRoute, RegisterRoute } from './auth';
import { HomeRoute } from './home';
import {
EditInvoiceRoute,
InvoiceRoute,
InvoicesRoute,
NewInvoiceRoute,
} from './invoices';
import { PublicRoute } from './public';

export const router = createBrowserRouter(
createRoutesFromElements(
<Route path='/' element={<Layout />}>
{/* public routes */}
<Route path='login' element={<LoginRoute />} />
<Route path='register' element={<RegisterRoute />} />

<Route element={<RequireAuth />}>
<Route index element={<PublicRoute />} />
<Route index element={<HomeRoute />} />
<Route path='invoices'>
<Route index element={<InvoicesRoute />} />
<Route path=':invoiceId' element={<InvoiceRoute />} />
Expand Down

0 comments on commit ddfce80

Please sign in to comment.