mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-07-09 17:18:51 +00:00
Fix Granola Max upgrade gating (#1095)
## Summary - Keep the Granola integration card in Upgrade state unless the active plan includes Max or above. - Prevent the Granola API-key modal from opening unless the active plan is Max or above in both the integrations grid and add-document connections UI.
This commit is contained in:
parent
0d2c6c8623
commit
24eb5a4367
2 changed files with 7 additions and 6 deletions
|
|
@ -948,8 +948,8 @@ export function ConnectContent({ selectedProject }: ConnectContentProps) {
|
|||
/>
|
||||
|
||||
<GranolaConnectModal
|
||||
open={granolaModalOpen}
|
||||
onOpenChange={setGranolaModalOpen}
|
||||
open={isMaxUser && granolaModalOpen}
|
||||
onOpenChange={(open) => setGranolaModalOpen(open && isMaxUser)}
|
||||
containerTags={[selectedProject]}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3066,8 +3066,9 @@ export function IntegrationsView({
|
|||
case "connector": {
|
||||
const count = connectionsByProvider[item.provider].length
|
||||
const isGranola = item.provider === "granola"
|
||||
const needsPlanUpgrade =
|
||||
!isAutumnLoading && (isGranola ? !hasMaxProduct : !hasProProduct)
|
||||
const needsPlanUpgrade = isGranola
|
||||
? !hasMaxProduct
|
||||
: !isAutumnLoading && !hasProProduct
|
||||
if (count > 0) {
|
||||
return (
|
||||
<div className="flex w-full items-center justify-between gap-2">
|
||||
|
|
@ -3894,8 +3895,8 @@ export function IntegrationsView({
|
|||
</Dialog>
|
||||
|
||||
<GranolaConnectModal
|
||||
open={granolaModalOpen}
|
||||
onOpenChange={setGranolaModalOpen}
|
||||
open={hasMaxProduct && granolaModalOpen}
|
||||
onOpenChange={(open) => setGranolaModalOpen(open && hasMaxProduct)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue