@quintype/native-components 2.19.26 → 2.19.27

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.19.27](https://github.com/quintype/native-components/compare/v2.19.26...v2.19.27) (2022-12-16)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **time-util:** Fix spacing for time-distance from now :hammer: ([67d9f37](https://github.com/quintype/native-components/commit/67d9f37459ee220f3c1ef1dd38b12ca7b65cf50e))
11
+
5
12
  ### [2.19.26](https://github.com/quintype/native-components/compare/v2.19.25...v2.19.26) (2022-12-16)
6
13
 
7
14
  ### [2.19.25](https://github.com/quintype/native-components/compare/v2.19.24...v2.19.25) (2022-12-07)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.19.26",
3
+ "version": "2.19.27",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@ export const getTimeForStoryCards = (
20
20
  format,
21
21
  localTime,
22
22
  translate,
23
- reverseTimeAdverbPosition = false
23
+ reverseTimeAdverbPosition = false,
24
24
  ) => {
25
25
  if (date) {
26
26
  const currentDate = new Date();
@@ -30,10 +30,10 @@ export const getTimeForStoryCards = (
30
30
  if (distanceInMinutes <= 1440) {
31
31
  const timeDistance = formatDistanceToNowStrict(dateToFormat, { locale });
32
32
  return reverseTimeAdverbPosition
33
- ? translate("ago") + timeDistance
34
- : timeDistance + translate("ago");
33
+ ? `${translate('ago')} ${timeDistance}`
34
+ : `${timeDistance} ${translate('ago')}`;
35
35
  }
36
36
  return dateFormat(dateToFormat, format, { locale });
37
37
  }
38
- return "";
38
+ return '';
39
39
  };