This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server'; | |
import { headers } from 'next/headers'; | |
import Stripe from 'stripe'; | |
import connectMongo from '@/libs/mongoose'; | |
import User from '@/models/User'; | |
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); | |
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET; | |
export async function POST(req) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useContext, useCallback } from 'react'; | |
import { Sun, Moon } from 'lucide-react'; | |
import { ThemeContext } from '~/hooks'; | |
const Theme = ({ theme, onChange }: { theme: string; onChange: (value: string) => void }) => { | |
const themeIcons = { | |
system: <Sun />, | |
dark: <Moon color="white" />, | |
light: <Sun />, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useRef } from 'react'; | |
import { useNavigate } from 'react-router-dom'; | |
const ScrollingTextRows: React.FC = () => { | |
const [hoveredRow, setHoveredRow] = useState<number | null>(null); | |
const scrollRefs = useRef<HTMLDivElement[]>([]); | |
const navigate = useNavigate(); | |
useEffect(() => { | |
const scroll = (direction: number, index: number) => { |