'use client' import React, { useState, useRef, useEffect, useMemo } from 'react' import dynamic from 'next/dynamic' import { X, Save, Settings } from 'lucide-react' import { GitHubIcon } from '@/components/GitHubIcon' import { soundEffects, DEFAULT_CHANNELS } from '@/lib/lofi_data' import ChannelButtons from '@/components/ChannelButtons' import PlaybackControls from '@/components/PlaybackControls' import ChannelManagement from '@/components/ChannelManagement' import SoundEffectsControls from '@/components/SoundEffectsControls' import { useLocalStorage } from '@/hooks/useLocalStorage' import { Channel, CustomSoundEffect } from '@/types/lofi' import SettingsModal from '@/components/SettingsModal' import styles from '@/styles/Lofi.module.css' const ReactPlayer = dynamic(() => import('react-player/youtube'), { ssr: false, }) // Type Definitions type AudioCache = { audio: HTMLAudioElement loaded: boolean } const StaticEffect = () => { const [staticPoints, setStaticPoints] = useState< { left: string; top: string; opacity: number }[] >([]) useEffect(() => { setStaticPoints( Array.from({ length: 100 }, () => ({ left: `${Math.random() * 100}%`, top: `${Math.random() * 100}%`, opacity: Math.random() * 0.5, })) ) }, []) return (
{allChannels[currentChannel].description}
by {allChannels[currentChannel].creator}
> ) : ( <>{DEFAULT_CHANNELS[0].description}
by {DEFAULT_CHANNELS[0].creator}
> )}Cannot delete the last remaining channel.
) : (Are you sure you want to delete " {allChannels[showDeleteConfirm].name}"? {showDeleteConfirm < DEFAULT_CHANNELS.length - hiddenDefaultChannels.length && ' This will hide the default channel.'}
)}