mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 15:28:25 +00:00
Fixed routing issues
This commit is contained in:
@@ -83,7 +83,7 @@ const AddProjectMemberDialog = ({
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="inline-flex justify-center rounded-md py-1 text-sm text-gray-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
className="inline-flex justify-center rounded-md py-1 text-sm text-gray-500 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
||||||
onClick={() => router.push(`/settings/org/${router.query.id}`)}
|
onClick={() => router.push(`/org/${router.query.id}/members`)}
|
||||||
aria-label="add member"
|
aria-label="add member"
|
||||||
/>,
|
/>,
|
||||||
// eslint-disable-next-line react/jsx-key
|
// eslint-disable-next-line react/jsx-key
|
||||||
@@ -91,7 +91,7 @@ const AddProjectMemberDialog = ({
|
|||||||
type="button"
|
type="button"
|
||||||
className="ml-1 inline-flex justify-center rounded-md py-1 text-sm text-gray-500 hover:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
className="ml-1 inline-flex justify-center rounded-md py-1 text-sm text-gray-500 hover:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
router.push(`/settings/org/${router.query.id}?invite`)
|
router.push(`/org/${router.query.id}/members?action=invite`)
|
||||||
}
|
}
|
||||||
aria-label="add member"
|
aria-label="add member"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { Fragment } from "react";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
|
|
||||||
|
import { useOrganization } from "@app/context";
|
||||||
|
|
||||||
// REFACTOR: Move all these modals into one reusable one
|
// REFACTOR: Move all these modals into one reusable one
|
||||||
type Props = {
|
type Props = {
|
||||||
isOpen?: boolean;
|
isOpen?: boolean;
|
||||||
@@ -15,6 +17,7 @@ const UpgradePlanModal = ({
|
|||||||
text,
|
text,
|
||||||
}:Props) => {
|
}:Props) => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { currentOrg } = useOrganization();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -61,7 +64,7 @@ const UpgradePlanModal = ({
|
|||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='inline-flex justify-center rounded-md border border-transparent bg-primary opacity-80 hover:opacity-100 px-4 py-2 text-sm font-medium text-black hover:text-semibold duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2'
|
className='inline-flex justify-center rounded-md border border-transparent bg-primary opacity-80 hover:opacity-100 px-4 py-2 text-sm font-medium text-black hover:text-semibold duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2'
|
||||||
onClick={() => router.push(`/settings/billing/${localStorage.getItem("projectData.id")}`)}
|
onClick={() => router.push(`/org/${currentOrg?._id}/billing`)}
|
||||||
>
|
>
|
||||||
Upgrade Now
|
Upgrade Now
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const AddTagsMenu = ({ allTags, currentTags, modifyTags, id }: { allTags: Tag[];
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className='w-full text-left bg-mineshaft-800 hover:bg-primary hover:text-black duration-200 px-2 py-0.5 text-bunker-200 rounded-sm'
|
className='w-full text-left bg-mineshaft-800 hover:bg-primary hover:text-black duration-200 px-2 py-0.5 text-bunker-200 rounded-sm'
|
||||||
onClick={() => router.push(`/settings/project/${String(router.query.id)}`)}
|
onClick={() => router.push(`/project/${String(router.query.id)}/settings`)}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faPlus} className="mr-2 text-xs" />Add more tags
|
<FontAwesomeIcon icon={faPlus} className="mr-2 text-xs" />Add more tags
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Ele
|
|||||||
const { currentOrg } = useOrganization();
|
const { currentOrg } = useOrganization();
|
||||||
const { mutateAsync, isLoading } = useGetOrgTrialUrl();
|
const { mutateAsync, isLoading } = useGetOrgTrialUrl();
|
||||||
const link = (subscription && subscription.slug !== null)
|
const link = (subscription && subscription.slug !== null)
|
||||||
? `/settings/billing/${localStorage.getItem("projectData.id") as string}`
|
? `/org/${currentOrg?._id}/billing`
|
||||||
: "https://infisical.com/scheduledemo";
|
: "https://infisical.com/scheduledemo";
|
||||||
|
|
||||||
const handleUpgradeBtnClick = async () => {
|
const handleUpgradeBtnClick = async () => {
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export const Navbar = () => {
|
|||||||
onKeyDown={() => null}
|
onKeyDown={() => null}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onClick={() => router.push(`/settings/personal/${router.query.id}`)}
|
onClick={() => router.push("/personal-settings")}
|
||||||
className="mx-1 my-1 flex cursor-pointer flex-row items-center rounded-md px-1 hover:bg-white/5"
|
className="mx-1 my-1 flex cursor-pointer flex-row items-center rounded-md px-1 hover:bg-white/5"
|
||||||
>
|
>
|
||||||
<div className="flex h-8 w-9 items-center justify-center rounded-full bg-white/10 text-gray-300">
|
<div className="flex h-8 w-9 items-center justify-center rounded-full bg-white/10 text-gray-300">
|
||||||
|
|||||||
Reference in New Issue
Block a user