Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(project): refactor pmi link #2053

Merged
merged 3 commits into from
Oct 23, 2023
Merged

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
2 checks passed
@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.

None yet

2 participants