diff --git a/src/app/slice/feedSlice.js b/src/app/slice/feedSlice.js index 28e4c79..3b867f1 100644 --- a/src/app/slice/feedSlice.js +++ b/src/app/slice/feedSlice.js @@ -5,7 +5,11 @@ import { } from '@reduxjs/toolkit'; import axios from 'axios'; -import { FEED_CACHE_NAME, CACHED_TIME_HEADER, CACHE_DURATION } from 'constants'; +import { + FEED_CACHE_NAME, + CACHED_TIME_HEADER, + CACHE_DURATION, +} from '../../constants'; import { deleteCache } from 'utils'; import { BASE_URL, config } from 'services'; diff --git a/src/utils/index.js b/src/utils/index.js index c58caf2..5f75fe5 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -17,9 +17,7 @@ export const deleteCache = async function ( url ) { try { - const cachedTime = Math.floor( - cachedResponse.headers.get(CACHED_TIME_HEADER) - ); + const cachedTime = cachedResponse.headers.get(CACHED_TIME_HEADER); const timeElapsed = (Date.now() - cachedTime) / 1000;