@ludo.ninja/components 2.2.33 → 2.2.34

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.
@@ -0,0 +1,5 @@
1
+ import { opportunitiesSchema as schema } from '@ludo.ninja/api';
2
+ declare const useCopyOpportunityShareLink: () => {
3
+ copyOpportunityShareLinkAction: ({ opportunityId, }: schema.IMutationCopyOpportunityShareLinkArgs) => Promise<void>;
4
+ };
5
+ export default useCopyOpportunityShareLink;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const api_1 = require("@ludo.ninja/api");
4
+ const type_1 = require("@ludo.ninja/ui/build/system/Alert/type");
5
+ const ui_1 = require("../../../../store/ui");
6
+ const useCopyOpportunityShareLink = () => {
7
+ const openAlert = (0, ui_1.useUiStore)((state) => state.openAlert);
8
+ const [mutate] = api_1.opportunitiesSchema.useCopyOpportunityShareLinkMutation({
9
+ context: {
10
+ uri: api_1.hosts.opportunitiesHost,
11
+ },
12
+ // onCompleted: () => {
13
+ // },
14
+ onError: (err) => {
15
+ openAlert({
16
+ type: type_1.alertVariants.error,
17
+ caption: err.message,
18
+ });
19
+ },
20
+ });
21
+ async function copyOpportunityShareLinkAction({ opportunityId, }) {
22
+ await mutate({
23
+ variables: { opportunityId },
24
+ });
25
+ }
26
+ return { copyOpportunityShareLinkAction };
27
+ };
28
+ exports.default = useCopyOpportunityShareLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.2.33",
3
+ "version": "2.2.34",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "publish": "npm publish --access public -workspace @ludo.ninja/components"
24
24
  },
25
25
  "dependencies": {
26
- "@ludo.ninja/api": "^3.0.21",
26
+ "@ludo.ninja/api": "^3.0.26",
27
27
  "@react-three/drei": "^9.68.3",
28
28
  "@react-three/fiber": "^8.13.0",
29
29
  "chart.js": "^4.4.3",