Skip to content

Commit

Permalink
Fix constants import path & remove Math.floor() call in `deleteCa…
Browse files Browse the repository at this point in the history
…che`
  • Loading branch information
rishavbharti committed Jun 24, 2022
1 parent 53718f3 commit 7024ae7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/app/slice/feedSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 1 addition & 3 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

1 comment on commit 7024ae7

@vercel
Copy link

@vercel vercel bot commented on 7024ae7 Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

growwgram – ./

growwgram-git-main-rishavbharti.vercel.app
growwgram-rishavbharti.vercel.app

Please sign in to comment.