@okam/directus-next-component 1.3.0 → 1.3.1

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.
@@ -4,9 +4,9 @@ const directusFile = require("./directus-file.js");
4
4
  function useFile(props) {
5
5
  const { file } = props;
6
6
  const { filename_download: filenameDownload } = file ?? {};
7
- const href = directusFile(file);
7
+ const { src } = directusFile(file) ?? {};
8
8
  return {
9
- href: (href == null ? void 0 : href.toString()) ?? void 0,
9
+ href: src,
10
10
  download: filenameDownload ?? true
11
11
  };
12
12
  }
@@ -3,9 +3,9 @@ import useDirectusFile from "./directus-file.mjs";
3
3
  function useFile(props) {
4
4
  const { file } = props;
5
5
  const { filename_download: filenameDownload } = file ?? {};
6
- const href = useDirectusFile(file);
6
+ const { src } = useDirectusFile(file) ?? {};
7
7
  return {
8
- href: (href == null ? void 0 : href.toString()) ?? void 0,
8
+ href: src,
9
9
  download: filenameDownload ?? true
10
10
  };
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okam/directus-next-component",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {