Skip to content

Commit

Permalink
fix: repository insight limited features (#3876)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeucapua authored Aug 6, 2024
2 parents 7478c8b + ed5c0ae commit 5ef6bd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
18 changes: 1 addition & 17 deletions components/molecules/InsightHeader/insight-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,7 @@ const InsightHeader = ({
<Button
className="text-xs w-max"
variant="primary"
onClick={() => {
if (overLimit) {
setIsInsightUpgradeModalOpen(true);
return;
}

router.push(`/workspaces/${workspaceId}/repository-insights/${insightId}/edit`);
}}
href={`/workspaces/${workspaceId}/repository-insights/${insightId}/edit`}
>
<FaEdit className="mr-2" /> Edit
</Button>
Expand Down Expand Up @@ -150,15 +143,6 @@ const InsightHeader = ({
defaultRange={Number(range)}
/>
</div>
{workspaceId && (
<InsightUpgradeModal
workspaceId={workspaceId}
variant="all"
isOpen={isInsightUpgradeModalOpen}
onClose={() => setIsInsightUpgradeModalOpen(false)}
overLimit={0}
/>
)}
</div>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TrackedReposTable } from "components/Workspaces/TrackedReposTable";
import Title from "components/atoms/Typography/title";
import Text from "components/atoms/Typography/text";
import { useIsWorkspaceUpgraded } from "lib/hooks/api/useIsWorkspaceUpgraded";
import WorkspaceBanner from "components/Workspaces/WorkspaceBanner";

const TrackedReposModal = dynamic(import("components/Workspaces/TrackedReposModal"));
const DeleteInsightPageModal = dynamic(import("components/organisms/InsightPage/DeleteInsightPageModal"));
Expand Down Expand Up @@ -142,6 +143,11 @@ export default function RepoInsightEditPage({ insight, workspaceId, isOwner, bea
return (
<WorkspaceLayout
workspaceId={workspaceId}
banner={
showBanner ? (
<WorkspaceBanner workspaceId={workspaceId} openModal={() => setIsInsightUpgradeModalOpen(true)} />
) : null
}
footer={
<Button
variant="primary"
Expand Down

0 comments on commit 5ef6bd6

Please sign in to comment.