mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 13:26:31 +00:00
fix: resolved pro trial button issue in sidebar
This commit is contained in:
+22
-19
@@ -27,7 +27,8 @@ import {
|
|||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
DropdownMenuLabel,
|
DropdownMenuLabel,
|
||||||
DropdownMenuTrigger
|
DropdownMenuTrigger,
|
||||||
|
Tooltip
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { envConfig } from "@app/config/env";
|
import { envConfig } from "@app/config/env";
|
||||||
import { useOrganization, useSubscription, useUser } from "@app/context";
|
import { useOrganization, useSubscription, useUser } from "@app/context";
|
||||||
@@ -386,26 +387,28 @@ export const MinimizedOrgSidebar = () => {
|
|||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
{subscription && subscription.slug === "starter" && !subscription.has_used_trial && (
|
{subscription && subscription.slug === "starter" && !subscription.has_used_trial && (
|
||||||
<button
|
<Tooltip content="Start Free Pro Trial" side="right">
|
||||||
type="button"
|
<button
|
||||||
onClick={async () => {
|
type="button"
|
||||||
if (!subscription || !currentOrg) return;
|
onClick={async () => {
|
||||||
|
if (!subscription || !currentOrg) return;
|
||||||
|
|
||||||
// direct user to start pro trial
|
// direct user to start pro trial
|
||||||
const url = await mutateAsync({
|
const url = await mutateAsync({
|
||||||
orgId: currentOrg.id,
|
orgId: currentOrg.id,
|
||||||
success_url: window.location.href
|
success_url: window.location.href
|
||||||
});
|
});
|
||||||
|
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
}}
|
}}
|
||||||
className="mt-1.5 w-full"
|
className="mt-1.5 w-full"
|
||||||
>
|
>
|
||||||
<div className="justify-left mb-1.5 mt-1.5 flex w-full items-center rounded-md bg-mineshaft-600 py-1 pl-4 text-mineshaft-300 duration-200 hover:bg-mineshaft-500 hover:text-primary-400">
|
<div className="justify-left mb-1.5 mt-1.5 flex w-full flex-col items-center rounded-md p-1 text-xs text-mineshaft-300 transition-all duration-150 hover:bg-mineshaft-500 hover:text-primary-400">
|
||||||
<FontAwesomeIcon icon={faInfinity} className="ml-0.5 mr-3 py-2 text-primary" />
|
<FontAwesomeIcon icon={faInfinity} className="py-2 text-lg text-primary" />
|
||||||
Start Free Pro Trial
|
Pro Trial
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger className="w-full" asChild>
|
<DropdownMenuTrigger className="w-full" asChild>
|
||||||
|
|||||||
Reference in New Issue
Block a user