@trackunit/react-components 0.0.102 → 0.0.103

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.
Files changed (2) hide show
  1. package/index.js +4 -7
  2. package/package.json +2 -3
package/index.js CHANGED
@@ -17,7 +17,7 @@ import ReactAsyncCreatableSelect from 'react-select/async-creatable';
17
17
  import ReactCreatableSelect from 'react-select/creatable';
18
18
  import ReactSelect from 'react-select';
19
19
  import ReactAsyncSelect from 'react-select/async';
20
- import ReactMoment from 'react-moment';
20
+ import { format, formatDistance } from 'date-fns';
21
21
 
22
22
  const docs = {
23
23
  source: {
@@ -4049,12 +4049,9 @@ const TimelineElement = ({
4049
4049
  size: "large"
4050
4050
  })
4051
4051
  }),
4052
- header = jsx(ReactMoment, Object.assign({
4053
- format: "LLL",
4054
- fromNow: true
4055
- }, {
4056
- children: date
4057
- }))
4052
+ header = `${format(date, "MMM d, yyyy")} (${formatDistance(date, new Date(), {
4053
+ addSuffix: true
4054
+ })})`
4058
4055
  }) => {
4059
4056
  var _a;
4060
4057
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "UNLICENSED",
6
6
  "dependencies": {
@@ -20,8 +20,7 @@
20
20
  "@popperjs/core": "^2.11.4",
21
21
  "history": "^5.3.0",
22
22
  "react-router-dom": "^6.2.2",
23
- "react-select": "^5.4.0",
24
- "react-moment": "^1.1.2"
23
+ "react-select": "^5.4.0"
25
24
  },
26
25
  "module": "./index.js",
27
26
  "main": "./index.js",