Skip to content

Commit

Permalink
feat: removed payments and limits
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline committed Oct 16, 2024
1 parent 0e52d57 commit f3a1a40
Show file tree
Hide file tree
Showing 32 changed files with 35 additions and 774 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ NEXT_PUBLIC_API_URL=https://beta.api.opensauced.pizza/v2
NEXT_PUBLIC_EXP_API_URL=https://beta.api.opensauced.pizza/v2
NEXT_PUBLIC_POSTHOG_ID=phc_Y0xz6nK55MEwWjobJsI2P8rsiomZJ6eZLoXehmMy9tt
NEXT_PUBLIC_CLOUD_NAME=dgxgziswe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=test
NEXT_PUBLIC_STRIPE_SUB_CANCEL_URL=https://billing.stripe.com/p/login/test_bIY8xy3iy6fpeHu3cc
SENTRY_DSN=https://3f5bb9023ff0407299dd22a6454558f9@o4504872488927232.ingest.sentry.io/4505082236960768
NEXT_PUBLIC_SENTRY_DSN=https://3f5bb9023ff0407299dd22a6454558f9@o4504872488927232.ingest.sentry.io/4505082236960768

Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ components/StarSearch/SuggestedPrompts.tsx @zeucapua @nickytonline @brandonrober
components/TabList/tab-list.tsx @zeucapua @jpmcb @brandonroberts
components/Tables/ContributorsGrid.tsx @zeucapua @brandonroberts @nickytonline
components/Tables/ContributorsTable.tsx @zeucapua @zeucapua @brandonroberts
components/Workspaces/InsightUpgradeModal.tsx @brandonroberts
components/Workspaces/TrackedRepoWizard/PasteReposStep.tsx @brandonroberts @nickytonline @zeucapua
components/Workspaces/TrackedReposTable.tsx @nickytonline @brandonroberts
components/Workspaces/WorkspaceCard.tsx @brandonroberts @zeucapua
Expand Down
21 changes: 0 additions & 21 deletions components/ListHeader/list-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { FaEdit } from "react-icons/fa";
import { FiCopy } from "react-icons/fi";
import { usePostHog } from "posthog-js/react";

import dynamic from "next/dynamic";
import { useState } from "react";
import { useRouter } from "next/router";
import Button from "components/shared/Button/button";
import Title from "components/atoms/Typography/title";
Expand All @@ -16,8 +14,6 @@ import StackedOwners from "components/Workspaces/StackedOwners";
import { shortenUrl } from "lib/utils/shorten-url";
import { writeToClipboard } from "lib/utils/write-to-clipboard";

const InsightUpgradeModal = dynamic(() => import("components/Workspaces/InsightUpgradeModal"));

interface ListHeaderProps {
name: string;
listId: string;
Expand All @@ -26,7 +22,6 @@ interface ListHeaderProps {
isOwner: boolean;
numberOfContributors: number;
owners?: string[];
overLimit?: boolean;
}

const ListHeader = ({
Expand All @@ -37,12 +32,10 @@ const ListHeader = ({
isOwner,
numberOfContributors,
owners,
overLimit,
}: ListHeaderProps): JSX.Element => {
const { toast } = useToast();
const posthog = usePostHog();
const router = useRouter();
const [isInsightUpgradeModalOpen, setIsInsightUpgradeModalOpen] = useState(false);

const handleCopyToClipboard = async () => {
const url = new URL(window.location.href).toString();
Expand Down Expand Up @@ -90,27 +83,13 @@ const ListHeader = ({
<Button
variant="primary"
onClick={() => {
if (overLimit) {
setIsInsightUpgradeModalOpen(true);
return;
}

router.push(`/workspaces/${workspaceId}/contributor-insights/${listId}/edit`);
}}
>
<FaEdit className="mr-2" /> Edit
</Button>
)}
</div>
{workspaceId && (
<InsightUpgradeModal
workspaceId={workspaceId}
variant="all"
isOpen={isInsightUpgradeModalOpen}
onClose={() => setIsInsightUpgradeModalOpen(false)}
overLimit={0}
/>
)}
</div>
);
};
Expand Down
218 changes: 0 additions & 218 deletions components/Workspaces/InsightUpgradeModal.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions components/Workspaces/WorkspaceBanner.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions components/molecules/InsightHeader/insight-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { usePostHog } from "posthog-js/react";
import { FiCopy } from "react-icons/fi";

import { useRouter } from "next/router";
import dynamic from "next/dynamic";
import getRepoInsights from "lib/utils/get-repo-insights";
import Button from "components/shared/Button/button";
import Title from "components/atoms/Typography/title";
Expand All @@ -21,16 +20,13 @@ import { useMediaQuery } from "lib/hooks/useMediaQuery";
import CardRepoList from "../CardRepoList/card-repo-list";
import ComponentDateFilter from "../ComponentDateFilter/component-date-filter";

const InsightUpgradeModal = dynamic(() => import("components/Workspaces/InsightUpgradeModal"));

interface InsightHeaderProps {
insight?: DbUserInsight;
repositories?: number[];
insightId: string;
canEdit: boolean | undefined;
workspaceId?: string;
owners?: string[];
overLimit?: boolean;
}

const InsightHeader = ({
Expand All @@ -40,14 +36,12 @@ const InsightHeader = ({
canEdit,
workspaceId,
owners,
overLimit,
}: InsightHeaderProps): JSX.Element => {
const router = useRouter();
const { range } = router.query;
const { data: repoData, meta: repoMeta } = useRepositories(repositories);
const { repoList } = getRepoInsights(repoData);
const [insightPageLink, setInsightPageLink] = useState("");
const [isInsightUpgradeModalOpen, setIsInsightUpgradeModalOpen] = useState(false);
const { toast } = useToast();
const posthog = usePostHog();
const isMobile = useMediaQuery("(max-width: 768px)");
Expand Down
Loading

0 comments on commit f3a1a40

Please sign in to comment.