diff --git a/src/app/(extra)/layout.jsx b/src/app/(extra)/layout.jsx index 22df13d..000f0b6 100644 --- a/src/app/(extra)/layout.jsx +++ b/src/app/(extra)/layout.jsx @@ -1,11 +1,9 @@ -import UserMenu from '@/components/UserMenu'; -import ReactorsLink from '@/components/ReactorsLink'; import NavBar from '@/components/NavBar' export default function ExtraLayout({children}) { return ( <> - )} reactorsLink={()} /> +
{children}
diff --git a/src/app/(extra)/reactors/account/layout.jsx b/src/app/(extra)/reactors/account/layout.jsx deleted file mode 100644 index e314410..0000000 --- a/src/app/(extra)/reactors/account/layout.jsx +++ /dev/null @@ -1,27 +0,0 @@ -import Link from 'next/link'; -import { redirect } from 'next/navigation'; - -import { cookies } from 'next/headers'; - -import db from '@/db'; - -async function getSession() { - const cookieStore = cookies(); - const sessionId = cookieStore.get('session'); - if (!sessionId) { - return false; - } - const { user_id: userId } = await db.get('select user_id from sessions where session_id=?;', sessionId.value); - if (!userId) { - return false; - } - return userId; -}; - -export default async function Layout({ children }) { - const userId = await getSession(); - if (!userId) { - redirect('/reactors'); - } - return children; -}; diff --git a/src/app/(extra)/reactors/account/page.jsx b/src/app/(extra)/reactors/account/page.jsx deleted file mode 100644 index 0364ff2..0000000 --- a/src/app/(extra)/reactors/account/page.jsx +++ /dev/null @@ -1,52 +0,0 @@ -import { cookies } from 'next/headers'; - -import db from '@/db'; -import { accountFeedURL } from '@/paths'; - -import { Container } from '@/components/Container'; - -async function getSession() { - const cookieStore = cookies(); - const sessionId = cookieStore.get('session'); - if (!sessionId) { - return false; - } - const dbRes = await db.get('select user_id from sessions where session_id=?;', sessionId.value); - const { user_id: userId } = dbRes ? dbRes : { user_id: false }; - if (!userId) { - return false; - } - return userId; -}; - -export default async function Page() { - const userId = await getSession(); - const { uuid } = await db.get('select uuid from subscriptions where user_id=?', userId); - return ( -
- -

- The Reactors -

-

Thank you so much for your support! It makes this show possible!

-
-
-

Your Personal Podcast Feed

-
-
-
-
-
Copy/Paste URL into your podcast app:
-
{accountFeedURL(uuid)}
-
-
-
Instructions For Common Podcast Apps:
-
Here
-
-
-
-
-
-
- ); -}; diff --git a/src/app/(extra)/reactors/create-account/page.jsx b/src/app/(extra)/reactors/create-account/page.jsx deleted file mode 100644 index ccda3b0..0000000 --- a/src/app/(extra)/reactors/create-account/page.jsx +++ /dev/null @@ -1,143 +0,0 @@ -export const dynamic = 'force-dynamic'; - -import Link from 'next/link' -import Stripe from 'stripe'; -const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); - -import { XCircleIcon } from '@heroicons/react/20/solid' - -import { Container } from '@/components/Container'; - - -// /reactors/create-account?csi=cs_test_a1pBB0FI8GUKnWYlCVn0RKUYXV8FRroacXjI5WVhWPlFJilm46lZwdjgac -export default async function Page({ searchParams }) { - const unexpectedError = searchParams['unexpected_error']; - const msg = searchParams['msg']; - const csi = searchParams['csi']; - const patreonMagicKey = searchParams['patreon_magic_key']; - const session = csi && await stripe.checkout.sessions.retrieve(csi); - const email = (csi && session && session.customer_details.email) || searchParams['email']; - if (unexpectedError) { - return ( - <> - Unexpected Error sorry about that! Please contact us via Contact and we will get it figured out! - - ); - } - return ( -
- -

- The Reactors - Create Account -

-
-

- Thank you so much for signing up to become a Reactor! We just need a password now to create an account for you! -

- {msg && ( -
-
-
-
-
-

There was an error with your submission

-
- {msg} -
-
-
-
- )} -
- - -
-
-
-
- -
- - -
-
-
- -
-
- -
- -
-
- -
- -
- -
-
- -
-
-
- -
-
- -
-
-
-
-
-
- ); -}; diff --git a/src/app/(extra)/reactors/page.jsx b/src/app/(extra)/reactors/page.jsx deleted file mode 100644 index 8d56aff..0000000 --- a/src/app/(extra)/reactors/page.jsx +++ /dev/null @@ -1,276 +0,0 @@ -import Image from 'next/image'; -import Link from 'next/link'; - -import { Container } from '@/components/Container'; - - -import { CheckIcon } from '@heroicons/react/20/solid' -import reactorsBackground from '@/images/reactors3.jpeg'; -import reactorsBackground2 from '@/images/reactors4.jpeg'; - -const features = [ - { - name: 'Ad-Free Episodes', - description: 'Enjoy the podcast the way its meant to be enjoyed: just good, pure fun!' - }, - { - name: 'The After-Show', - description: 'The After-Show, when the reactor really heats up! Regular, subscriber-only bonus content!', - }, - { - name: 'Thank you for your financial support!', - description: 'It makes this show possible!', - } -]; - -const tiers = [ - { - name: 'Monthly (USD)', - id: 'tier-monthly', - href: process.env.SUB_MONTHLY_URL, - price: '$10', - priceUnit: 'monthly', - description: '', - features: features.map(({ name }) => name), - }, - { - name: 'Annual (USD)', - id: 'tier-annual', - href: process.env.SUB_ANNUAL_URL, - price: '$100', - priceUnit: 'yearly', - description: '', - features: [{ name: 'Save $20 by going yearly!' }, ...features].map(({ name }) => name), - }, -]; - -const faqs = [ - { - question: 'How do I listen to subscriber-exclusive podcasts and content?', - answer: `You will be provided with a unique podcast feed that you will be able to add to your favorite podcast player. We support Apple Podcasts, Spotify, Overcast, Podcast Addict, Pocket Casts, Podcast Republic, Downcast, RSSRadio, Podkicker, and more. Unfortunately we aren't able to support Stitcher, or any other podcast player that doesn't support importing private feeds.`, - }, - { - question: 'How do I get in touch?', - answer: (Send us a message on the Contact Us page.) - }, - { - question: 'How do I cancel my subscription?', - answer: (You can cancel your subsription at any time from your account page.) - }, - { - question: 'Why do you have a discounted subscription if it offers the same benefits?', - answer: `Good question! The main point of the subscription is to support the show but we also don't want to create benefits for only the more well-off or those living in wealthier locations. However, we are residents of the United States which has a higher cost of living so offering really low cost subscriptions doesn't provide a lot of benefit to us, after processing fees and administrative overhead, which is why the discounted subscription is annual only.` - } -] - -export default async function Page() { - return ( -
- artistic rendering of an atom -
- - - Reactors - - )}> - {reactorsLink} - - {navigation.map((item) => ( - Reactors - - ) - } else { - return ( - - Reactors - - ); - } -}; diff --git a/src/components/UserMenu.jsx b/src/components/UserMenu.jsx deleted file mode 100644 index af5f20a..0000000 --- a/src/components/UserMenu.jsx +++ /dev/null @@ -1,70 +0,0 @@ -'use server'; - -import Link from 'next/link'; - -import UserMenuClient from '@/components/UserMenuClient'; - -import { cookies } from 'next/headers'; - -import db from '@/db'; - -const signedInNavigation = [ - { name: 'Account', href: '/reactors/account' }, - { name: 'Sign Out', href: '/' }, -] - -async function getSession() { - const cookieStore = cookies(); - const sessionId = cookieStore.get('session'); - if (!sessionId) { - return false; - } - const { user_id: userId } = await db.get('select user_id from sessions where session_id=?;', sessionId.value); - if (!userId) { - return false; - } - return userId; -}; - -export default async function UserMenu() { - const userId = await getSession(); - return ( - - {userId ? ( - <> - - Account - -
- -
- - ) : ( - <> - - Sign In - - - Create Account - - - )} -
- ); -}; diff --git a/src/components/UserMenuClient.jsx b/src/components/UserMenuClient.jsx deleted file mode 100644 index 326e2a4..0000000 --- a/src/components/UserMenuClient.jsx +++ /dev/null @@ -1,72 +0,0 @@ -'use client'; - -import { Fragment } from 'react' -import { Disclosure, Menu, Transition } from '@headlessui/react' -import { Bars3Icon, UserCircleIcon, XMarkIcon } from '@heroicons/react/24/outline' - -function classNames(...classes) { - return classes.filter(Boolean).join(' ') -} - -export default function UserMenu({ children }) { - return ( - <> -
- - Open user menu - - -
- - - {children.map((link, i) => ( - - {link} - - ))} - - - - ); -}; - -/* - * {({ active }) => ( - * - * Your Profile - * - * )} - * - * - * {({ active }) => ( - * - * Settings - * - * )} - * - * - * {({ active }) => ( - * - * Sign out - * - * )} - * */ diff --git a/src/images/reactors.jpg b/src/images/reactors.jpg deleted file mode 100644 index 804182a..0000000 Binary files a/src/images/reactors.jpg and /dev/null differ diff --git a/src/images/reactors2.jpg b/src/images/reactors2.jpg deleted file mode 100644 index dca5df4..0000000 Binary files a/src/images/reactors2.jpg and /dev/null differ diff --git a/src/images/reactors3.jpeg b/src/images/reactors3.jpeg deleted file mode 100644 index 842143b..0000000 Binary files a/src/images/reactors3.jpeg and /dev/null differ diff --git a/src/images/reactors4.jpeg b/src/images/reactors4.jpeg deleted file mode 100644 index 1ab4f83..0000000 Binary files a/src/images/reactors4.jpeg and /dev/null differ