mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Add vercel.json
This commit is contained in:
+13
-16
@@ -2,13 +2,7 @@ import jwtDecode from 'jwt-decode';
|
||||
import { useEffect } from 'react';
|
||||
import { Routes, Route, Navigate } from 'react-router-dom';
|
||||
import { useLazyQuery, useReactiveVar } from '@apollo/client';
|
||||
import {
|
||||
Protected,
|
||||
Public,
|
||||
Navbar,
|
||||
Sidebar,
|
||||
Spinner,
|
||||
} from './components';
|
||||
import { Protected, Public, Navbar, Sidebar, Spinner } from './components';
|
||||
import { roleVar, tokenVar, userVar } from './graphql/state';
|
||||
import {
|
||||
AdditionalInfo,
|
||||
@@ -89,15 +83,18 @@ const App = () => {
|
||||
</>
|
||||
)}
|
||||
<Routes>
|
||||
<Route path='/' element={
|
||||
<Protected>
|
||||
{role !== 'admin' ? (
|
||||
<Navigate to='/project' />
|
||||
) : (
|
||||
<Navigate to='/clients' />
|
||||
)}
|
||||
</Protected>
|
||||
} />
|
||||
<Route
|
||||
path='/'
|
||||
element={
|
||||
<Protected>
|
||||
{role !== 'admin' ? (
|
||||
<Navigate to='/project' />
|
||||
) : (
|
||||
<Navigate to='/clients' />
|
||||
)}
|
||||
</Protected>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path='/project'
|
||||
element={
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
|
||||
}
|
||||
Reference in New Issue
Block a user