This commit is contained in:
2024-05-24 10:15:02 +08:00
parent a8877ab28e
commit 739925b046
3 changed files with 11 additions and 3 deletions

6
composer.json Normal file
View File

@@ -0,0 +1,6 @@
{
"require": {
"laravel/sanctum": "^4.0",
"laravel/ui": "^4.5"
}
}

View File

@@ -18,13 +18,16 @@ function App() {
const getCSRF = async ()=>{
try {
await http.get('/sanctum/csrf-cookie')
const res= await http.get('/api/user')
console.log(res.data);
} catch (error) {
console.error(error)
}
}
return (
<div className='App' style={{marginTop: '20px' }}>
<div className='App' style={{marginTop: '20px' }}>
<Route path="/*" element={<Login />} />
<AppShell
header={{height: 50}}
navbar={{width: 300, breakpoint: 'sm', collapsed: {mobile: !opened}}}

View File

@@ -4,14 +4,13 @@ import NotFound from "./NotFound";
import List from "./Lists";
import View from './View';
import Edit from "./Edit";
// import Registration from "./Registration";
// import Login from "./Login";
const RouterSwitcher = () => {
return(
<Routes>
{/* <Route path="/*" element={<Registration />} /> */}
{/* <Route path="/*" element={<Login />} /> */}
<Route path="/home" element={<Home />} />
<Route path="/lists" element={<List />} />