diff --git a/src/hooks/useFollowingEvents.js b/src/hooks/useFollowingEvents.js index 768dd631..1013d51f 100644 --- a/src/hooks/useFollowingEvents.js +++ b/src/hooks/useFollowingEvents.js @@ -35,8 +35,7 @@ export const useFollowingEvents = () => { const base = getApiBase(); const resp = await fetch(base + '/api/account/events/following', { credentials: 'include', - cache: 'no-store', - headers: { 'Cache-Control': 'no-cache' } + cache: 'no-store' }); if (resp.ok) { const data = await resp.json(); diff --git a/src/hooks/useWatchlist.js b/src/hooks/useWatchlist.js index 4c17e812..e3404ad8 100644 --- a/src/hooks/useWatchlist.js +++ b/src/hooks/useWatchlist.js @@ -63,8 +63,7 @@ export const useWatchlist = () => { const base = getApiBase(); const resp = await fetch(base + '/api/account/watchlist/realtime', { credentials: 'include', - cache: 'no-store', - headers: { 'Cache-Control': 'no-cache' } + cache: 'no-store' }); if (resp.ok) { const data = await resp.json(); diff --git a/src/views/Company/index.js b/src/views/Company/index.js index ea1357d4..a8141c17 100644 --- a/src/views/Company/index.js +++ b/src/views/Company/index.js @@ -96,8 +96,7 @@ const CompanyIndex = () => { const base = getApiBase(); const resp = await fetch(base + '/api/account/watchlist', { credentials: 'include', - cache: 'no-store', - headers: { 'Cache-Control': 'no-cache' } + cache: 'no-store' }); if (!resp.ok) { setIsInWatchlist(false); diff --git a/src/views/Dashboard/Center.js b/src/views/Dashboard/Center.js index 4a71c0b0..de48c101 100644 --- a/src/views/Dashboard/Center.js +++ b/src/views/Dashboard/Center.js @@ -101,9 +101,9 @@ export default function CenterDashboard() { const ts = Date.now(); const [w, e, c] = await Promise.all([ - fetch(base + `/api/account/watchlist?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }), - fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }), - fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store', headers: { 'Cache-Control': 'no-cache' } }), + fetch(base + `/api/account/watchlist?_=${ts}`, { credentials: 'include', cache: 'no-store' }), + fetch(base + `/api/account/events/following?_=${ts}`, { credentials: 'include', cache: 'no-store' }), + fetch(base + `/api/account/events/posts?_=${ts}`, { credentials: 'include', cache: 'no-store' }), ]); const jw = await w.json(); @@ -154,8 +154,7 @@ export default function CenterDashboard() { const base = getApiBase(); const response = await fetch(base + '/api/account/watchlist/realtime', { credentials: 'include', - cache: 'no-store', - headers: { 'Cache-Control': 'no-cache' } + cache: 'no-store' }); if (response.ok) {