diff --git a/packages/dashboard/src/pages/payments.js b/packages/dashboard/src/pages/payments.js index 84f3d23c..f79a9b24 100644 --- a/packages/dashboard/src/pages/payments.js +++ b/packages/dashboard/src/pages/payments.js @@ -1,7 +1,6 @@ import dayjs from "dayjs"; import Layout from "../components/Layout"; import useSWR from "swr"; -import { useEffect } from "react"; import ky from "ky/umd"; import { useState } from "react"; @@ -55,6 +54,7 @@ export default function Payments() { const { data: user } = useSWR(`${apiPrefix}/user`, fetcher); const [selectedPlan, setSelectedPlan] = useState(plans[0]); const activePlan = plans.find(({ tier }) => user?.tier === tier); + const isFreePlan = ({ tier }) => tier === 1; const handleSubscribe = async () => { try { const price = selectedPlan.stripe; @@ -75,14 +75,14 @@ export default function Payments() {