Skip to content

Conversation

syt-honey
Copy link
Member

@syt-honey syt-honey commented Oct 23, 2023

+    useEffect(() => {
+       const checkPmi = (): void => {
+           if (!globalStore.pmi) {
+               globalStore.updatePmi();
+           }
+        };
+
+       checkPmi();
+    }, [globalStore]);

When using global pmi, you should check whether the pmi exists, or if it does not, invoke updatePmi() to get pmi first.

@syt-honey syt-honey marked this pull request as draft October 23, 2023 04:45
@syt-honey syt-honey marked this pull request as ready for review October 23, 2023 05:02
@syt-honey syt-honey merged commit cb7fd75 into netless-io:main Oct 23, 2023
@syt-honey syt-honey deleted the pmi-link branch October 23, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants