Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: repository insight limited features #3876

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading