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:
+6
-9
@@ -2,13 +2,7 @@ import jwtDecode from 'jwt-decode';
|
|||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { Routes, Route, Navigate } from 'react-router-dom';
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
||||||
import { useLazyQuery, useReactiveVar } from '@apollo/client';
|
import { useLazyQuery, useReactiveVar } from '@apollo/client';
|
||||||
import {
|
import { Protected, Public, Navbar, Sidebar, Spinner } from './components';
|
||||||
Protected,
|
|
||||||
Public,
|
|
||||||
Navbar,
|
|
||||||
Sidebar,
|
|
||||||
Spinner,
|
|
||||||
} from './components';
|
|
||||||
import { roleVar, tokenVar, userVar } from './graphql/state';
|
import { roleVar, tokenVar, userVar } from './graphql/state';
|
||||||
import {
|
import {
|
||||||
AdditionalInfo,
|
AdditionalInfo,
|
||||||
@@ -89,7 +83,9 @@ const App = () => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path='/' element={
|
<Route
|
||||||
|
path='/'
|
||||||
|
element={
|
||||||
<Protected>
|
<Protected>
|
||||||
{role !== 'admin' ? (
|
{role !== 'admin' ? (
|
||||||
<Navigate to='/project' />
|
<Navigate to='/project' />
|
||||||
@@ -97,7 +93,8 @@ const App = () => {
|
|||||||
<Navigate to='/clients' />
|
<Navigate to='/clients' />
|
||||||
)}
|
)}
|
||||||
</Protected>
|
</Protected>
|
||||||
} />
|
}
|
||||||
|
/>
|
||||||
<Route
|
<Route
|
||||||
path='/project'
|
path='/project'
|
||||||
element={
|
element={
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user