test
This commit is contained in:
6
composer.json
Normal file
6
composer.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"laravel/sanctum": "^4.0",
|
||||||
|
"laravel/ui": "^4.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,13 +18,16 @@ function App() {
|
|||||||
const getCSRF = async ()=>{
|
const getCSRF = async ()=>{
|
||||||
try {
|
try {
|
||||||
await http.get('/sanctum/csrf-cookie')
|
await http.get('/sanctum/csrf-cookie')
|
||||||
|
const res= await http.get('/api/user')
|
||||||
|
console.log(res.data);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='App' style={{marginTop: '20px' }}>
|
<div className='App' style={{marginTop: '20px' }}>
|
||||||
|
<Route path="/*" element={<Login />} />
|
||||||
<AppShell
|
<AppShell
|
||||||
header={{height: 50}}
|
header={{height: 50}}
|
||||||
navbar={{width: 300, breakpoint: 'sm', collapsed: {mobile: !opened}}}
|
navbar={{width: 300, breakpoint: 'sm', collapsed: {mobile: !opened}}}
|
||||||
|
|||||||
@@ -4,14 +4,13 @@ import NotFound from "./NotFound";
|
|||||||
import List from "./Lists";
|
import List from "./Lists";
|
||||||
import View from './View';
|
import View from './View';
|
||||||
import Edit from "./Edit";
|
import Edit from "./Edit";
|
||||||
// import Registration from "./Registration";
|
|
||||||
// import Login from "./Login";
|
// import Login from "./Login";
|
||||||
|
|
||||||
|
|
||||||
const RouterSwitcher = () => {
|
const RouterSwitcher = () => {
|
||||||
return(
|
return(
|
||||||
<Routes>
|
<Routes>
|
||||||
{/* <Route path="/*" element={<Registration />} /> */}
|
|
||||||
{/* <Route path="/*" element={<Login />} /> */}
|
{/* <Route path="/*" element={<Login />} /> */}
|
||||||
<Route path="/home" element={<Home />} />
|
<Route path="/home" element={<Home />} />
|
||||||
<Route path="/lists" element={<List />} />
|
<Route path="/lists" element={<List />} />
|
||||||
|
|||||||
Reference in New Issue
Block a user