Create a TaskList for the home page. (#8)
This task list can display tasks and delete them currently. Reviewed-on: #8 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
d60d834f38
commit
a683a071d1
8 changed files with 526 additions and 37 deletions
25
frontend/app/routes/$.tsx
Normal file
25
frontend/app/routes/$.tsx
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { redirect } from 'react-router'
|
||||
import type { Route } from './+types/$'
|
||||
|
||||
export async function loader({ request }: Route.LoaderArgs) {
|
||||
const url = new URL(request.url)
|
||||
|
||||
// Handle React DevTools and other development files
|
||||
if (
|
||||
url.pathname.endsWith('.js.map') ||
|
||||
url.pathname.includes('installHook') ||
|
||||
url.pathname.startsWith('/__') ||
|
||||
url.pathname.startsWith('/node_modules/')
|
||||
) {
|
||||
// Return a 404 response for these dev-only requests
|
||||
throw new Response('Not Found', { status: 404 })
|
||||
}
|
||||
|
||||
// For any other unmatched routes, redirect to home
|
||||
return redirect('/')
|
||||
}
|
||||
|
||||
export default function CatchAll() {
|
||||
// This component should never render since we always redirect or throw
|
||||
return null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue