chore: switch to react-router v7
This commit is contained in:
parent
39504e2487
commit
aa9872a45b
101 changed files with 3825 additions and 6796 deletions
|
|
@ -1,15 +1,15 @@
|
|||
import { ActionFunctionArgs, redirect } from '@remix-run/node'
|
||||
import { destroySession, getSession } from '~/utils/sessions'
|
||||
import { ActionFunctionArgs, redirect } from 'react-router';
|
||||
import { destroySession, getSession } from '~/utils/sessions';
|
||||
|
||||
export async function loader() {
|
||||
return redirect('/machines')
|
||||
return redirect('/machines');
|
||||
}
|
||||
|
||||
export async function action({ request }: ActionFunctionArgs) {
|
||||
const session = await getSession(request.headers.get('Cookie'))
|
||||
const session = await getSession(request.headers.get('Cookie'));
|
||||
return redirect('/login', {
|
||||
headers: {
|
||||
'Set-Cookie': await destroySession(session)
|
||||
}
|
||||
})
|
||||
'Set-Cookie': await destroySession(session),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue