@sunggang/ui-lib 0.2.22 → 0.2.24

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.
Files changed (2) hide show
  1. package/index.esm2.js +16 -0
  2. package/package.json +1 -1
package/index.esm2.js CHANGED
@@ -43836,6 +43836,22 @@ var LiffProvider = function(param) {
43836
43836
  accessToken,
43837
43837
  error
43838
43838
  ]);
43839
+ useEffect(function() {
43840
+ if (liffObject && loginData && accessToken) {
43841
+ var contextToSave = {
43842
+ liffObject: liffObject,
43843
+ loginData: loginData,
43844
+ accessToken: accessToken,
43845
+ error: error
43846
+ };
43847
+ localStorage.setItem(localStorageKey, JSON.stringify(contextToSave));
43848
+ }
43849
+ }, [
43850
+ liffObject,
43851
+ loginData,
43852
+ accessToken,
43853
+ error
43854
+ ]);
43839
43855
  // 只在 liffObject 有值且已登入時渲染子組件
43840
43856
  return /*#__PURE__*/ jsx(LiffContext.Provider, {
43841
43857
  value: contextValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@mdx-js/react": "^3.0.1",