bugfix - code cleanup

This commit is contained in:
James Wyndham 2024-02-29 14:31:07 +08:00
parent 9f4a4749ab
commit 3411d0d7df
64 changed files with 30 additions and 167 deletions

View File

@ -1,14 +0,0 @@
import { cookies } from "next/headers";
export async function setCookie(key: string, value: string) {
const cookieStore = cookies()
cookieStore.set(key, value)
}
export async function removeCookie(key: string) {
const cookieStore = cookies()
cookieStore.delete(key)
}
export async function getCookie(key: string) {
const cookieStore = cookies()
return cookieStore.get(key)
}

View File

@ -6,7 +6,7 @@ import { cookies } from "next/headers";
import CryptoJS from 'crypto-js';
import { CheckoutSession, SignUpForm, SourceModal, Subscription, SubscriptionSession, User } from "@/types";
import { apiPrices } from "../(admin)/pricing/actions";
import { apiPrices } from "./(public)/pricing/actions";
export async function mailchimp(formData: {
email: string;
@ -58,7 +58,7 @@ export async function signup(formData: SignUpForm) {
const email = formData.email;
const password = formData.password;
const organisation = formData.organisation;
console.log('app/(auth)/actions', 'organisation', organisation)
console.log('app/(authenticated)/actions', 'organisation', organisation)
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING as string;
const adminToken = process.env.NEXT_PUBLIC_POCKETBASE_ADMIN_TOKEN as string;
try {
@ -230,7 +230,7 @@ export async function getSubscriptions() {
pb.authStore.loadFromCookie(cookie?.value || '');
const userId = (pb.authStore.model as User).id
const subscriptions = await pb.collection("subscription").getFullList<Subscription>({filter: `user_id="${userId}" && status="active"`});
console.log('app/(auth)/actions', 'subscriptions', subscriptions)
console.log('app/(authenticated)/actions', 'subscriptions', subscriptions)
if (subscriptions.length === 0){
return [];
}

View File

@ -1,8 +1,8 @@
import "./globals.css";
import type { Metadata } from "next";
import "../app/globals.css";
import { Arimo, Raleway, Indie_Flower } from "next/font/google";
import { ToastContainer, toast } from "react-toastify";
import { Arimo, Indie_Flower } from "next/font/google";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import Header from "@/components/Header";
import { cookies } from "next/headers";

View File

@ -5,7 +5,6 @@ import { useEffect } from "react";
import React from "react";
import { WaitingListWithImageHero } from "@/sections/Hero";
import PageWrapper from "@/components/Utilities/PageWrapper";
import pb from "@/lib/pocketbase";
export default function Home() {
useEffect(() => {

View File

@ -2,7 +2,7 @@
import React, { useEffect, useState } from "react";
import { Subscription, User } from "@/types";
import { getSubscriptions } from "@/app/(auth)/actions";
import { getSubscriptions } from "@/app/actions";
import { useRouter } from "next/navigation";
interface GetStartedSectionButtonProps {

View File

@ -4,7 +4,7 @@ import React, { useEffect, useState } from "react";
import Navigation from "@/components/Navigation";
import ModalSignUp from "@/components/Modals/ModalSignUp";
import ModalSignIn from "@/components/Modals/ModalSignIn";
import { getAuthCookie, getUser, logout } from "@/app/(auth)/actions";
import { getAuthCookie, getUser, logout } from "@/app/actions";
import { SourceModal, User } from "@/types";
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
import pb from "@/lib/pocketbase";

View File

@ -1,5 +1,5 @@
import React from "react";
import Icon from "../images/icon.svg";
import Link from "next/link";
import Image from "next/image";
@ -21,7 +21,13 @@ function Logo({ label, className }: LogoProps) {
>
{/* <Image className="absolute hover:rotate-[360deg] transition duration-1000 ease-in-out" src={logoArrow} alt="Logo"/> */}
<Image priority src={Icon} alt="Follow us on Twitter" width={40} />
<Image
priority
src={"/icons/logo.svg"}
alt="Follow us on Twitter"
width={40}
height={40}
/>
{label !== undefined ? (
<span className="invisible absolute left-[50%] top-[-40px] translate-x-[-50%] p-1 rounded-lg font-bold bg-gray-800 text-fuchsia-400 group-hover:visible">
{label}

View File

@ -5,7 +5,7 @@ import colors from "@/utils/colors";
import { useForm } from "react-hook-form";
import { yupResolver } from "@hookform/resolvers/yup";
import { signInValidationSchema } from "@/utils/form";
import { login } from "@/app/(auth)/actions";
import { login } from "@/app/actions";
import { toast } from "react-toastify";
function ModalSignIn() {

View File

@ -7,7 +7,7 @@ import { yupResolver } from "@hookform/resolvers/yup";
import { signUpValidationSchema } from "@/utils/form";
import { companySizeList } from "@/constants";
import pb from "@/lib/pocketbase";
import { createCheckoutSession, login } from "@/app/(auth)/actions";
import { createCheckoutSession, login } from "@/app/actions";
import { toast } from "react-toastify";
import { Price, User } from "@/types";
import { useRouter } from "next/navigation";

View File

@ -1,7 +1,7 @@
"use client";
import { Price, Product, SourceModal } from "@/types";
import { createCheckoutSession, isAuthenticated } from "@/app/(auth)/actions";
import { createCheckoutSession, isAuthenticated } from "@/app/actions";
import { toast } from "react-toastify";
import { useRouter } from "next/navigation";
import Icon from "@/components/Icon/Icon";
@ -101,9 +101,15 @@ export default function PriceCard({
? (product?.yearlyPrice?.unit_amount ?? 0) / 100
: (product?.monthlyPrice?.unit_amount ?? 0) / 100}
</h1>
{product?.type != "one_time" ? (
<p className="w-16 leading-5 text-sm text-base-content ">
per user per {isAnnual ? "year" : "month"}
</p>
) : (
<p className="w-16 leading-5 text-sm text-base-content ">
One Time
</p>
)}
</div>
)}
{product && (

View File

@ -3,6 +3,7 @@
import colors, { hexToRgb } from "@/utils/colors";
import { useTheme } from "next-themes";
import React, { ReactNode, useEffect, useState } from "react";
import Circuit from "@/images/circuit.svg";
const Background = ({ children }: { children: ReactNode }) => {
const { theme } = useTheme();

View File

@ -1,26 +0,0 @@
export const IconLoading = () => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
className="animate-spin -ml-1 mr-3 h-5 w-5 bg-base-content"
viewBox="0 0 24 24"
>
<circle
cx="12"
cy="12"
r="10"
stroke="currentColor"
strokeWidth="4"
className="opacity-25"
></circle>
<path
fill="currentColor"
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
className="opacity-75"
></path>
</svg>
);
};
export default IconLoading;

View File

@ -1,3 +0,0 @@
<svg width="129" height="129" viewBox="0 0 129 129" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M64.5 12.9C50.8148 12.9 37.6902 18.3364 28.0133 28.0133C18.3364 37.6902 12.9 50.8148 12.9 64.5C12.9 78.1852 18.3364 91.3098 28.0133 100.987C37.6902 110.664 50.8148 116.1 64.5 116.1C78.1852 116.1 91.3098 110.664 100.987 100.987C110.664 91.3098 116.1 78.1852 116.1 64.5C116.1 50.8148 110.664 37.6902 100.987 28.0133C91.3098 18.3364 78.1852 12.9 64.5 12.9ZM0 64.5C0 28.8766 28.8766 0 64.5 0C100.123 0 129 28.8766 129 64.5C129 100.123 100.123 129 64.5 129C28.8766 129 0 100.123 0 64.5ZM94.5828 43.5569C95.8598 44.6932 96.6335 46.2901 96.7339 47.9965C96.8343 49.703 96.2531 51.3795 95.1181 52.6578L60.7203 91.3578C60.1152 92.0388 59.3726 92.5838 58.5416 92.9571C57.7106 93.3303 56.8099 93.5233 55.8989 93.5233C54.9879 93.5233 54.0873 93.3303 53.2562 92.9571C52.4252 92.5838 51.6827 92.0388 51.0775 91.3578L33.8818 72.0078C32.8119 70.7208 32.2842 69.0682 32.4101 67.3993C32.536 65.7303 33.3057 64.1757 34.5567 63.0637C35.8076 61.9518 37.4418 61.3696 39.114 61.4403C40.7862 61.5109 42.3654 62.2287 43.5181 63.4422L55.9021 77.3677L85.4818 44.0858C86.6191 42.8097 88.2164 42.0372 89.9229 41.938C91.6293 41.8388 93.3054 42.4211 94.5828 43.5569Z" fill="#FF0DCA"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,9 +0,0 @@
<svg width="47" height="46" viewBox="0 0 47 46" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="47" height="46" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_22_385" transform="matrix(0.010195 0 0 0.0104167 0.0106383 0)"/>
</pattern>
<image id="image0_22_385" width="96" height="96" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAACtklEQVR4nO2dTWpUQRSFv1E7MoL4F7eQuBODSMgSBBegyzBEUYMzcQ0O1U20QnAYZyL4kygiCVceVINI2khed5376p0PzqTJzzn3Vt16PXkFxhhjzDC4DtwHXgL7wPei/fLZPWBVbbJFVoEXwC8gTlH3M8+Ba2rTrXAL+PIfhf9bn4ENtfmhcxc4PkPxZ+p+9446xFDZAI56FH+m7m/cVIcZGpeAjwso/kyfgCvqUEPi2QKLP9OuOtRQuAz8WEIDfgJXaZAbwEPgLXC4hMLFCeqe+zeB80W3gb1K//uwZN0B1pWFPwc87fmUEmcs/sUT/HSffajspcv+BJgoiv+mctgo6lb+PLZEnl7XbsKuKGiUkTOPFaGvxzVn/nHSBlwQ+uq+b6zVaMCOMGSUA3cem2Jv2zUa8E4ccu8fh/B7sbdpjQZ8E4eM8rSzVWb+Sln56uJHqc3SUYeM5HIDcAPkqzC8A/SFCI8gfTFCIJ8BuAHyVRjeAfpChEeQaEb2pPkzIDuRPV96g63nS2+w9XzpDbaeL73B1vOlN9h6vvQGW8/X12DrWjrqgJFcbgBugHwVhneAvhDhEaQvRgjkMwA3QL4KwztAuEVPYfQjSE2M/QxQE26AG9AL7wA8gvrgESQmfAa4Ab1Qf9GJ5Fo66oCRXG4AboB8FYZ3gL4Q4RGkL0YI5DMAN0C+CsM7QLhFe9L8CMpOZM+X3mDr+dIbbD1feoOt50tvsPV86Q22ni+9wdbz9TXYupaOOmAklxuAGyBfheEdoC9EeATpixEC+QzADZCvwmh5BxwkCBlJ9XUMry6OxJqO4eXdkVgPajRgfUHXS0Vjqvb6esq1HerAkUyPqMikXNuhDh1J9Epxj8ykXNsx5nF0VFZ+9eL/yVq5OWI6kkfUg5J1u+bMN8YYY4wxxhhjjDEMnt/lHMkEtRRJ/wAAAABJRU5ErkJggg=="/>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,9 +0,0 @@
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="50" height="50" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_22_387" transform="scale(0.0104167)"/>
</pattern>
<image id="image0_22_387" width="96" height="96" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAELElEQVR4nO2dyW9PURTHPwjVbprUsCDUjr2tEIkhQkuMf4IphGBvx8JYLBpiYWljWhmWpo05uhAtEcMCpRthUUdeciSNpH4/fve9e85995N8N23pPefbe9/93eE8yGQymUwmk8lkMhlbzARWAruBM8At4CkwCAwDP1TD+rXiezf1Z3cBK4AZsYPwRAewFjipyfwJSIv6qf/XCaAXaI8dpDUmAouAfmAkQMIb6RtwEegBJlFjpgI7gKEKkj6eimFru7alVsPMfuB9xMT/qaIt+7RtSVN0+1cGEi7j6C2wiQSZB1wzkGBpUleAbhJhnU4TxZlGgC04pk2nk+Jc/RqLK6YB9wwkTwLpDtCFE2bpBx9JTAPAXIyzAHhjIFlSkt5ojCaZDbw2kCSpYKrabXHMHzCQHKlIL3Sh0ARtiT1wpUndtTI7Om0gGRJJfbGTvzFC0I2ouj0biLi88DUbwJdYD+Wrkbp9I2KtHVW+vhMjUGmibbHaVaz0VkJH5Pl+I2K1a6iq7c4DEYOUJtoXs217y05+Me99lw1gPAM+lN0LdkT+C5Mm2hi7fdvKPL0QcwNdnBhQbPRPKMOApQaCEwcGFFpShgHnDQQmTgw4Fzr57ZE+9YpTA0ZCP4zXGghKHBlQaE1IAyxtrjdCjOgoAbG0x9sIMaJHBGJmoFPKdTNgFJgewoCVBoIRhwYUWhbCgN0GAhGnBuwMYcAZA4GIUwOCbFneNBCIODXgeggDnhkIRJwa8CSEAdYOWzVCDKlYvGyZT84MuG+gjb/1MYQBP5wZ0GnooNj3OhpgyYTvKQ5BnU22u9PAcPQxxYfwg3+4LBG7JwylOA0VRyY8SfGDmKjuOxiOrqe4FCGOekJfiotx4siEnSkuR4sjE4IsR88wtiEjTp4Jo3p1K7ktSXHSEx4SkBMGkivOTDgS0oBeA4kVZ8PR6lQPZomDnhD8YJalo4lSUk84FPD3niXhw7lSQk84GPh3Li7rePqggYRK4J4QOvkvyzqebuWChgTsCaGTX2griV9RkkAmHCyp+F/pFRj3GUiktDgchXzgjtUeKrqmarnyoUTSYJVVeVcZCFiMKeh9AMulCsSgLhGBbi1UITXXcMxacj1OlqqlJBWxrycyfQYSIZF0HAO0aV1NqZluA1MwQqcewZCa6LnFQq51Kls5F6PUoXDrfByULk5xOBoA5uCELq2rKQk9cLtwxmTgcAKfE/otzXb+t86E1xc4bCYRup2tHV22PNNpdenCQtUt+cuSctDjJBbp0OqC7wwkfOzcfk/d3rLXpi9Ri7nRP6hF9kxUQY/JQq1JVMV9tOKA2QU9uVza6QWvtOvO0jHgsZ4wbjXho1q756iO77V6bWGrTAeW60WHU8ANNaYYOj6PeZ3tZ/3aY70WdEr/zbJQNXsymUwmk8lkMplMhkD8ApuTFklOqp8wAAAAAElFTkSuQmCC"/>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,9 +0,0 @@
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="50" height="50" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_22_386" transform="scale(0.0104167)"/>
</pattern>
<image id="image0_22_386" width="96" height="96" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAADIklEQVR4nO3by04UQRTG8X9mxoVcTLxtBHdGfAEJPIGXtaLRxIUati4R1iosBRFCeAMJGsX4HhpcGy6aeMEtwq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g width="45" height="45" viewBox="0 0 45 45" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<rect width="45" height="45" fill="url(#pattern0)"/>
<defs>
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
<use xlink:href="#image0_22_389" transform="scale(0.0104167)"/>
</pattern>
<image id="image0_22_389" width="96" height="96" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAEvUlEQVR4nO2dbYhWRRTHf7v2YmRW4pYhEdi76JeiIqwgEcoKpJIsiiKiEEIke6M3iMANrAwp0iishUAqikTL7MU+BIH0paLECtekLCvLzDDLbScGztIiyT1znzv33mfm/OB8vmfO/5k7c885Mw8YhmEYRnfhCswwAdLG2QwwAbLG2QwwAbLG2QwwAbLG2QwwAbKhBzgduAboB9YqZsC7wNPALcAZTQ+gWzkHeBzYpgh4kX0DPAFMb3pQbedQ4GZgcwVBP5i9D8xoeqBt5CLg84iBP9BWARObHnQbGAMsBv6pMfgj9kPus2Es8FoDgR9t+4C5ZMghwOqGgz9ifwNzyIynSgbrN+AdYBnwCHAnsAhYArzYwQL+BzCNTJgTGJw9wArgLPkuKGIK8KCIFfKcL4DDSJwjA/f2q4HjSj6rD1gZKIIXLmnuCAjGAxU98z5gWPnM3cCxJEovsFUZiKUVP/ueAOHvJ1EuVAZgS4R3cY8yj+RtULnWdB39ygBcG+n5JwB7lT74XFRyfKAY+F7giIg+PFvz+tMqdigGvi6yD2cqBYjtRyNpB81OZFkNvnyt8ON7EqOvRfvwF5S+HE1CTFYO+q4afJmv9GUqCTFBOejHWpQKuZjEsp/7FYN+tUXfI5eTGIPKVMDhkf2YphTgahJDW3yZ27SjqbJQKcBg5I+xbDkxoPa7MtV8TNOsUwrggOVStDcqbj9xAfYRcIopUC0vl6jX9su3hFEBxwPbA0VwUuP1PUQnmQqdMyMgN3+g+YX8TeAq2y11xmXAnyVFGN0x8QowDzjKZkY4FwA7OxRhxLyYa6Qt3fo+A78PPqxIhBEbAt6ScwW+FmEUMAa4FfixYiG8/SpdFrZ4KxgvbYb7IgixX9rSfVnSULyW/N7/p0hCPCNVOqMAn5q+EdgYQYifgSuLHDD+42TgbklPVHmgY4UcjzICm6zmy4nIoQpEWG/fEeWZKDuo9wKacP/PNtRQjUueU2XLuaukCC81PYBUGAc8BPxeQoTrmnY+JfqAgUABdsr3iFEhN0jiTiuCP09gVMzMgOzrt1aTjsP1AbPgvEg+ZM96pQAPZx+piDUIjQCvkwB+Mbu3wGY2cFjwO4UA/tB316Op+z7fgF+aaxJ8Jrbr0ZQb32jAr+UKv/4iAT5TDHRjSwXwRaGuZ43ylzauha+gX0iAxcodx+ya/dqk8MnP3q5HexxooEafpua0DR2vLLAPAafV5NOS3PJBmnXAyW4o9pmA6bLmaPzx9xMlwRXKATu5BSsWvrv6E6UfX5IQvXIblWbgw3JWuCdCR/anAT+EBSTG7IDBO3ltVdG344W8SXlPxehUdJJn1FYFirBHLvcrc0LmGOA24OPAZ7qUe4X83QtflQjIsLzCnpPO50uAc6UA78U5G5glDVxL5Vqcsm3v/gs5aabIjbWuhfZ2DrcmItfRb21BwEfb2lTf+wdjktxk3nTgfYvjo7keh+2Vayx3NxT8TVIdy55JwJNyHLWOwG+WxTzLX33Rl+rtEbqfnbQq+oTfpTLzDEXD7Tz565ENgeeKd0mRZ0ASaufLfUVGh4xVBN+nHIyIuAIzIuNMgGZxJoAJkDXOZoAJkDXOZoAJYBiGYRh0yr8niBptUthQxAAAAABJRU5ErkJggg=="/>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,3 +0,0 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20 20C25.525 20 30 15.525 30 10C30 4.475 25.525 0 20 0C14.475 0 10 4.475 10 10C10 15.525 14.475 20 20 20ZM20 25C13.325 25 0 28.35 0 35V40H40V35C40 28.35 26.675 25 20 25Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 299 B

View File

@ -1,3 +0,0 @@
<svg width="42" height="34" viewBox="0 0 42 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M31.4167 33.6667V14.9167H27.25V0.333374H41.8333L37.6667 10.75H41.8333L31.4167 33.6667ZM27.25 19.0834V33.6667H4.33333C2.04166 33.6667 0.166664 31.7917 0.166664 29.5V23.25C0.166664 20.9584 2.04166 19.0834 4.33333 19.0834H27.25ZM9.02083 24.8125H5.89583V27.9375H9.02083V24.8125ZM23.0833 0.333374V14.9167H4.33333C2.04166 14.9167 0.166664 13.0417 0.166664 10.75V4.50004C0.166664 2.20837 2.04166 0.333374 4.33333 0.333374H23.0833ZM9.02083 6.06254H5.89583V9.18754H9.02083V6.06254Z" fill="black"/>
</svg>

Before

Width:  |  Height:  |  Size: 601 B

View File

@ -1,4 +0,0 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="18.4956" y="19.9999" width="26.1569" height="2.12731" transform="rotate(-135 18.4956 19.9999)" fill="#D9D9D9"/>
<rect y="18.4957" width="26.1569" height="2.12731" transform="rotate(-45 0 18.4957)" fill="#D9D9D9"/>
</svg>

Before

Width:  |  Height:  |  Size: 326 B

View File

@ -1,26 +0,0 @@
<svg width="48" height="51" viewBox="0 0 48 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M46.7723 39.9527C42.1757 46.597 34.3963 50.9648 25.5734 50.9648C11.4496 50.9648 0 39.772 0 25.9648C0 12.1577 11.4496 0.964844 25.5734 0.964844C32.1071 0.964844 37.8932 3.21241 42.4136 7.15371C41.2289 8.75027 40.5904 9.64787 39.4867 11.2511C35.7461 7.44854 31.2551 6.00308 25.4324 6.00308C14.078 6.00308 4.87342 15.0013 4.87342 26.1011C4.87342 37.201 14.078 46.1992 25.4324 46.1992C32.6266 46.1992 38.9577 42.5869 42.6313 37.1164L46.7723 39.9527Z" fill="url(#paint3_linear_5_100)"/>
<path d="M41.2295 8.76853L44.9088 3.75089L48 14.9964L36.8566 14.9974L41.2295 8.76853Z" fill="url(#paint4_linear_5_100)"/>
<defs>
<linearGradient id="paint0_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint1_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint2_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint3_linear_5_100" x1="1.39274e-07" y1="25.2506" x2="48" y2="25.2506" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint4_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,30 +0,0 @@
<svg width="48" height="51" viewBox="0 0 48 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.5518 19.2279H37.1922V23.1337H14.5518V19.2279Z" fill="url(#paint0_linear_5_100)"/>
<path d="M14.5518 25.7345H37.1923V29.6403H14.5518V25.7345Z" fill="url(#paint1_linear_5_100)"/>
<path d="M18.548 32.2445H31.8659V36.1503H18.548V32.2445Z" fill="url(#paint2_linear_5_100)"/>
<path d="M18.548 19.2251H27.8706V23.1309H18.548V19.2251Z" fill="black" fill-opacity="0.2"/>
<path d="M18.548 25.7345H27.8706V29.6403H18.548V25.7345Z" fill="black" fill-opacity="0.2"/>
<path d="M18.548 32.2445H27.8706V36.1503H18.548V32.2445Z" fill="black" fill-opacity="0.2"/>
<defs>
<linearGradient id="paint0_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint1_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint2_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint3_linear_5_100" x1="1.39274e-07" y1="25.2506" x2="48" y2="25.2506" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
<linearGradient id="paint4_linear_5_100" x1="24" y1="0.964844" x2="24" y2="50.9648" gradientUnits="userSpaceOnUse">
<stop stop-color="#AB4FD7"/>
<stop offset="1" stop-color="#DF3CCF"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View File

@ -1,2 +0,0 @@
[build]
functions = "./netlify/functions"

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-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svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

Before

Width:  |  Height:  |  Size: 629 B

View File

@ -3,7 +3,7 @@
import {
createManagementSubscriptionSession,
getSubscriptions,
} from "@/app/(auth)/actions";
} from "@/app/actions";
import { Subscription, User } from "@/types";
import React from "react";
import { useState, useEffect } from "react";

View File

@ -5,7 +5,7 @@ import { Product } from "@/types";
import PriceCard from "@/components/PriceCard";
import { useState } from "react";
import PriceToggle from "@/components/PriceToggle";
import { apiPrices } from "../app/(admin)/pricing/actions";
import { apiPrices } from "../app/(public)/pricing/actions";
const Payment = ({
type = "one_time",