Skip to content

Commit

Permalink
feat: removed payments and limits (#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickytonline authored Oct 16, 2024
1 parent 0e52d57 commit 898d889
Show file tree
Hide file tree
Showing 32 changed files with 35 additions and 775 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
2 changes: 0 additions & 2 deletions 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 Expand Up @@ -84,7 +83,6 @@ components/molecules/DevProfile/dev-profile.tsx @nickytonline @zeucapua @brandon
components/molecules/FilterHeader/filter-header.tsx @brandonroberts
components/molecules/HighlightInput/highlight-input-form.tsx @zeucapua
components/molecules/HoverCardWrapper/hover-card-wrapper.tsx @nickytonline @zeucapua
components/molecules/InsightHeader/insight-header.tsx @zeucapua @zeucapua @brandonroberts
components/molecules/ListCard/list-card.tsx @nickytonline @brandonroberts
components/molecules/NewsletterForm/newsletter-form.stories.tsx @brandonroberts @jpmcb @zeucapua
components/molecules/NewsletterForm/newsletter-form.tsx @brandonroberts @zeucapua @nickytonline
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 898d889

Please sign in to comment.