@unitedstatespowersquadrons/components 1.3.4-4 → 1.3.4-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,17 @@ import Badge from "./Badge";
5
5
  import { dateBadgeColor } from "./Date";
6
6
 
7
7
  interface Props {
8
- timestamp: number;
8
+ date: Date;
9
9
  label?: string;
10
10
  logo?: string;
11
11
  }
12
12
 
13
13
  const LiveDateBadge = (props: Props) => {
14
- const { timestamp, label = "date", logo } = props;
14
+ const { date, label = "date", logo } = props;
15
15
 
16
16
  const now = Math.floor(Date.now() / 1000);
17
17
 
18
- const badgeTimestamp = Math.floor(new Date(timestamp).getTime() / 1000);
18
+ const badgeTimestamp = Math.floor(date.getTime() / 1000);
19
19
  const badgeDate = new Date(badgeTimestamp * 1000);
20
20
  const badgeDateDiff = badgeTimestamp - now;
21
21
  const color = dateBadgeColor(badgeDateDiff);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitedstatespowersquadrons/components",
3
- "version": "1.3.4-4",
3
+ "version": "1.3.4-5",
4
4
  "description": "USPS shared React components library",
5
5
  "main": "index.tsx",
6
6
  "scripts": {