Skip to content

Commit

Permalink
check for hrefWithParams
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Aug 29, 2024
1 parent bbe5cff commit 7172699
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apps/potlock/widget/Project/CreateForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1000,9 +1000,11 @@ return (
type: "primary",
text: "View your project",
disabled: false,
href: props.hrefWithParams(
`?tab=project&projectId=${registeredProject?.id || context.accountId}`
),
href:
props.hrefWithParams &&
props.hrefWithParams(
`?tab=project&projectId=${registeredProject?.id || context.accountId}`
),
}}
/>
<Widget
Expand All @@ -1011,7 +1013,7 @@ return (
type: "secondary",
text: "View all projects",
disabled: false,
href: props.hrefWithParams(`?tab=projects`),
href: props.hrefWithParams && props.hrefWithParams(`?tab=projects`),
}}
/>
</ButtonsContainer>
Expand Down

0 comments on commit 7172699

Please sign in to comment.