@threedddplus/logoeditor 0.0.70 → 0.0.72

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/example/index.tsx CHANGED
@@ -1,13 +1,40 @@
1
1
  import 'react-app-polyfill/ie11';
2
2
  import * as React from 'react';
3
3
  import * as ReactDOM from 'react-dom';
4
- // import { Componnets, use3dddPlus } from '../.';
5
- // import { shallow } from 'zustand/shallow';
6
- import { LogoEditor } from '../dist';
4
+ import { Componnets, use3dddPlus } from '../.';
5
+ import { shallow } from 'zustand/shallow';
6
+
7
7
  const App = () => {
8
+ const queryString = window.location.search;
9
+ const urlParams = new URLSearchParams(queryString);
10
+ const projectId = urlParams.get('projectId');
11
+ const productId = urlParams.get('productId');
12
+ const [accessToken] = use3dddPlus((state) => [state.accessToken], shallow);
13
+ const modelId = use3dddPlus((state) => state.modelId);
14
+
15
+ // API calls for Login in 3dddPlus
16
+ React.useEffect(() => {
17
+ if (!projectId) return;
18
+ // setCookie('projectId', projectId, 1);
19
+ use3dddPlus.getState().mutation.login(projectId);
20
+ }, [projectId]);
8
21
 
22
+ // API calls for Product Details and Varients Detail
23
+ React.useEffect(() => {
24
+ if (!accessToken) return;
25
+ use3dddPlus.getState().queries.getDetails(productId!, projectId!);
26
+ if (!modelId) return;
27
+ use3dddPlus.getState().queries.getVarientByModelId(modelId!);
28
+ }, [accessToken, modelId]);
9
29
  return (
10
- <LogoEditor stepperId={undefined} onApply={undefined} customLogoColorList={undefined} defaultColorList={undefined} logoData={undefined} customerId={undefined} onSaveLogo={undefined}/>
30
+ <div className="flex flex-col">
31
+ {/* {children ||
32
+ `You Should not see this Screen! If you're then the Customizer is still under maintainance`} */}
33
+ <div className="flex md:flex-row flex-col h-screen">
34
+ <Componnets.Canvas />
35
+ <Componnets.Sidebar />
36
+ </div>
37
+ </div>
11
38
  );
12
39
  };
13
40
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.70",
2
+ "version": "0.0.72",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.tsx",
5
5
  "typings": "dist/index.d.ts",