@threedddplus/logoeditor 0.0.70 → 0.0.71
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/dist/logoeditor.cjs.development.js +9 -14
- package/dist/logoeditor.cjs.development.js.map +1 -1
- package/dist/logoeditor.cjs.production.min.js +1 -1
- package/dist/logoeditor.cjs.production.min.js.map +1 -1
- package/dist/logoeditor.esm.js +9 -14
- package/dist/logoeditor.esm.js.map +1 -1
- package/example/index.tsx +31 -4
- package/package.json +1 -1
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
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
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