Skip to content

Commit

Permalink
use session entity
Browse files Browse the repository at this point in the history
  • Loading branch information
thesandlord committed Feb 5, 2025
1 parent 8ed8055 commit 3e462ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mercoa/react",
"description": "Mercoa React Component Library",
"version": "0.0.70-rc3",
"version": "0.0.70-rc4",
"author": "Sandeep Dinesh <[email protected]>",
"license": "MIT",
"repository": {
Expand Down
14 changes: 9 additions & 5 deletions src/components/EntityOnboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2661,11 +2661,15 @@ export function EntityOnboarding({
: mercoaSession?.organization?.payorOnboardingOptions)

useEffect(() => {
if (!mercoaSession.client || !entityId) return
mercoaSession.client.entity.get(entityId).then((resp) => {
setEntity(resp)
})
}, [mercoaSession.client, entityId, mercoaSession.refreshId])
if (!mercoaSession.client) return
if (entityId) {
mercoaSession.client.entity.get(entityId).then((resp) => {
setEntity(resp)
})
} else if (mercoaSession.entity) {
setEntity(mercoaSession.entity)
}
}, [mercoaSession.client, entityId, mercoaSession.refreshId, mercoaSession.entity])

useEffect(() => {
if (!mercoaSession.organization) return
Expand Down

0 comments on commit 3e462ad

Please sign in to comment.