• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlp-rwanda / e-commerce-mavericks-fn / 9906973345

12 Jul 2024 11:13AM UTC coverage: 0.0%. Remained the same
9906973345

push

github

web-flow
Merge pull request #27 from atlp-rwanda/187816382-product-view-details

[finishes #187816382] product details page

0 of 85 branches covered (0.0%)

Branch coverage included in aggregate %.

0 of 756 new or added lines in 19 files covered. (0.0%)

0 of 4489 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/utils/token.ts
NEW
1
import { jwtDecode } from 'jwt-decode';
×
NEW
2

×
NEW
3
// Function to check token expiration and handle deletion
×
NEW
4
const isTokenExpired = async (token: string) => {
×
NEW
5
  if (!localStorage.getItem('token')) {
×
NEW
6
    return true;
×
NEW
7
  }
×
NEW
8

×
NEW
9
  try {
×
NEW
10
    const decodedToken = jwtDecode(token);
×
NEW
11
    const expirationTime = decodedToken.exp! * 1000;
×
NEW
12

×
NEW
13
    const currentTime = Date.now();
×
NEW
14
    return currentTime >= expirationTime;
×
NEW
15
  } catch (error) {
×
NEW
16
    return true;
×
NEW
17
  }
×
NEW
18
};
×
NEW
19

×
NEW
20
export default isTokenExpired;
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc