diff --git a/pages/dashboard/index.js b/pages/dashboard/index.js index 69efa57..9e64150 100644 --- a/pages/dashboard/index.js +++ b/pages/dashboard/index.js @@ -1286,7 +1286,7 @@ function Dashboard(props) { onChange={value => handlePresentationChange(value, 'facility_chu_chart')} placeholder="presentation type" title="Select Presentation Type" - className='self-end z-40' /> + className='self-end' /> } @@ -1321,7 +1321,7 @@ function Dashboard(props) { onChange={value => handlePresentationChange(value, 'facility_chu_chart')} placeholder="presentation type" title="Select Presentation Type" - className='self-end z-40' /> + className='self-end' /> diff --git a/pages/facilities/index.js b/pages/facilities/index.js index 69cfa9b..4deace9 100644 --- a/pages/facilities/index.js +++ b/pages/facilities/index.js @@ -143,6 +143,9 @@ function FacilityHome(props) { const dataFetcher = async (url) => { let token = null + let response = [] + + if(!!window){ const cookie = document.cookie const access_token = JSON.parse(cookie.split('=')[1])?.token @@ -152,13 +155,22 @@ function FacilityHome(props) { } - return token ? await (await fetch(url, { - headers: { - Accept: 'application/json, */*', - Authorization: `Bearer ${token}` - - } - })).json() : Promise((_, reject) => reject('Token is not valid')) + try { + response = await (await fetch(url, { + headers: { + Accept: 'application/json, */*', + Authorization: `Bearer ${token}` + } + })).json() + } + catch(e) { + console.log(e.message) + } + + return response + + + } /** diff --git a/pages/index.js b/pages/index.js index 1d6bd94..d841782 100644 --- a/pages/index.js +++ b/pages/index.js @@ -92,9 +92,9 @@ function Home() {
-
+
{/* Logo And Title */} -
+
{/* Heading */}
{/* Heading */} @@ -126,7 +126,7 @@ function Home() {
{/* Menu Heading */} -
+
{/* Menu Heading */}