diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91a204aca..48412fadb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,7 @@ jobs: run: npm ci - name: Run linter - run: npm run lint || true - # TODO: Remove "|| true" after cleanup branch fixes all lint errors + run: npm run lint - name: Run tests run: npm test @@ -38,5 +37,5 @@ jobs: SKIP_ENV_VALIDATION: true # Provide dummy values for required env vars during build MONGODB_URI: mongodb://localhost:27017/test - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_dummy + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: pk_test_Y2xlcmsuY29tJA CLERK_SECRET_KEY: sk_test_dummy diff --git a/.gitignore b/.gitignore index 944028550..be5ecf891 100644 --- a/.gitignore +++ b/.gitignore @@ -81,3 +81,10 @@ next-env.d.ts claude.md # Local Netlify folder .netlify + +.gemini/ +gha-creds-*.json + +# Gemini Agent Files +.github/commands/ +.github/workflows/gemini-*.yml diff --git a/src/app/betting-history/page.jsx b/src/app/betting-history/page.jsx index f7e0ed183..3c2c7eafd 100644 --- a/src/app/betting-history/page.jsx +++ b/src/app/betting-history/page.jsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect } from 'react'; +import { useState } from 'react'; import useSWR from 'swr'; import { useUser } from '@clerk/nextjs'; import Link from 'next/link'; diff --git a/src/app/change-password/page.jsx b/src/app/change-password/page.jsx deleted file mode 100644 index 25da7328c..000000000 --- a/src/app/change-password/page.jsx +++ /dev/null @@ -1,18 +0,0 @@ -"use client"; - -import { UserProfile, SignedIn, SignedOut, RedirectToSignIn } from "@clerk/nextjs"; - -export default function AccountPage() { - return ( -
- -

Account Settings

- -
- - - - -
- ); -} \ No newline at end of file diff --git a/src/app/change-username/page.jsx b/src/app/change-username/page.jsx deleted file mode 100644 index 7a46836b1..000000000 --- a/src/app/change-username/page.jsx +++ /dev/null @@ -1,10 +0,0 @@ -"use client"; - -export default function ProfilePage() { - return ( -
-

Your Profile

- {/* Add your profile display components here */} -
- ); -} \ No newline at end of file diff --git a/src/app/contexts/DarkModeContext.jsx b/src/app/contexts/DarkModeContext.jsx deleted file mode 100644 index 3a7933190..000000000 --- a/src/app/contexts/DarkModeContext.jsx +++ /dev/null @@ -1,57 +0,0 @@ -'use client'; - -import React, { createContext, useContext, useEffect, useState, useCallback } from 'react'; - -const DarkModeContext = createContext(); - -export const DarkModeProvider = ({ children }) => { - // Initialize state to match what the inline script set (check the DOM) - // This prevents hydration mismatch by syncing with the pre-rendered state - const [isDark, setIsDark] = useState(() => { - // During SSR, return false (server doesn't have localStorage) - if (typeof window === 'undefined') return false; - // On client, check if dark class was already added by inline script - return document.documentElement.classList.contains('dark'); - }); - const [isLoaded, setIsLoaded] = useState(false); - - // Sync state with DOM on mount (handles edge cases) - useEffect(() => { - const hasDarkClass = document.documentElement.classList.contains('dark'); - if (hasDarkClass !== isDark) { - setIsDark(hasDarkClass); - } - setIsLoaded(true); - }, []); - - // Handle dark mode changes after initial load - useEffect(() => { - if (!isLoaded) return; - - if (isDark) { - document.documentElement.classList.add('dark'); - localStorage.setItem('darkMode', 'true'); - } else { - document.documentElement.classList.remove('dark'); - localStorage.setItem('darkMode', 'false'); - } - }, [isDark, isLoaded]); - - const toggleDarkMode = useCallback(() => { - setIsDark(prev => !prev); - }, []); - - return ( - - {children} - - ); -}; - -export const useDarkMode = () => { - const context = useContext(DarkModeContext); - if (!context) { - throw new Error('useDarkMode must be used within DarkModeProvider'); - } - return context; -}; diff --git a/src/app/daily-tasks/page.html b/src/app/daily-tasks/page.html deleted file mode 100644 index 0f40ff5c9..000000000 --- a/src/app/daily-tasks/page.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - Daily Tasks - - - - - -
-

Daily Tasks

-
- -
- -

Total Biscuits: XXX

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Log in100 biscuits
Share with a friend100 biscuits
Make a bid100 biscuits
-
- - - - - -
\ No newline at end of file diff --git a/src/app/daily-tasks/style.css b/src/app/daily-tasks/style.css deleted file mode 100644 index 77dc08959..000000000 --- a/src/app/daily-tasks/style.css +++ /dev/null @@ -1,28 +0,0 @@ -body{ - background-color: #4B2E83; -} -h1{ - color: black; -} -header{ - background-color: #FCCE5A; font-family:'Times New Roman', Times, serif; - border-radius: 20px; -} -#box1{ - /* width: 200px; */ - /* margin-top: 0px; */ - height: 400px; - background-color: #FFDE8A; - border-radius: 20px; -} -#biscuitlogo{ - height: 100px; - float:left; - margin-right:4px; -} -#biscuitNumber{ - font-size: 20px; -} -#taskList{ - -} diff --git a/src/app/dashboard/page.jsx b/src/app/dashboard/page.jsx index df2f066e7..c4a23bd16 100644 --- a/src/app/dashboard/page.jsx +++ b/src/app/dashboard/page.jsx @@ -3,8 +3,8 @@ import { useEffect, useRef } from 'react'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; -import { useUserContext } from '../contexts/UserContext'; -import { useUserStats } from '../hooks/useAPI'; +import { useUserContext } from '@/app/contexts/UserContext'; +import { useUserStats } from '@/app/hooks/useAPI'; import { BalanceDisplay, DottedDivider, diff --git a/src/app/data/games.js b/src/app/data/games.js deleted file mode 100644 index e1d4e36e7..000000000 --- a/src/app/data/games.js +++ /dev/null @@ -1,50 +0,0 @@ -export const SAMPLE_GAMES = [ - { - id: 1, - opponent: 'Michigan State', - date: '2024-08-31', - time: '3:30 PM', - location: 'Husky Stadium', - isHome: true, - week: 1 - }, - { - id: 2, - opponent: 'Oregon', - date: '2024-09-14', - time: '7:00 PM', - location: 'Husky Stadium', - isHome: true, - week: 3 - }, - { - id: 3, - opponent: 'USC', - date: '2024-09-28', - time: '4:00 PM', - location: 'Los Angeles Memorial Coliseum', - isHome: false, - week: 5 - }, -]; - -export const HISTORICAL_DATA = { - 'Michigan State': { - wins: 3, - losses: 2, - winPercentage: 0.60, - odds: 1.8 // Higher odds mean better payout for correct prediction - }, - 'Oregon': { - wins: 4, - losses: 6, - winPercentage: 0.40, - odds: 2.2 - }, - 'USC': { - wins: 5, - losses: 5, - winPercentage: 0.50, - odds: 2.0 - } -}; \ No newline at end of file diff --git a/src/app/data/users.js b/src/app/data/users.js deleted file mode 100644 index 6fa1f988b..000000000 --- a/src/app/data/users.js +++ /dev/null @@ -1,72 +0,0 @@ -export const SAMPLE_USERS = [ - { - id: 1, - username: 'Nadia', - biscuits: 5200, - winRate: 0.75, - totalBids: 20 - }, - { - id: 2, - username: 'Sophie', - biscuits: 4800, - winRate: 0.70, - totalBids: 15 - }, - { - id: 3, - username: 'Yonie', - biscuits: 4500, - winRate: 0.65, - totalBids: 18 - }, - { - id: 4, - username: 'Vanya', - biscuits: 3800, - winRate: 0.60, - totalBids: 12 - }, - { - id: 5, - username: 'Elizabeth', - biscuits: 3500, - winRate: 0.58, - totalBids: 14 - }, - { - id: 6, - username: 'Zeke', - biscuits: 3200, - winRate: 0.55, - totalBids: 10 - }, - { - id: 7, - username: 'Abel', - biscuits: 3000, - winRate: 0.52, - totalBids: 8 - }, - { - id: 8, - username: 'Angel', - biscuits: 2800, - winRate: 0.50, - totalBids: 6 - }, - { - id: 9, - username: 'Jake', - biscuits: 2500, - winRate: 0.48, - totalBids: 5 - }, - { - id: 10, - username: 'Molly', - biscuits: 2200, - winRate: 0.45, - totalBids: 4 - } -]; \ No newline at end of file diff --git a/src/app/games/page.jsx b/src/app/games/page.jsx index 8111dee11..5e44c0344 100644 --- a/src/app/games/page.jsx +++ b/src/app/games/page.jsx @@ -12,7 +12,7 @@ import { } from '@/components/experimental'; import ErrorBoundary from '@components/ErrorBoundary'; import { GameCardSkeleton } from '@/components/ui/LoadingSkeleton'; -import { useUserContext } from '../contexts/UserContext'; +import { useUserContext } from '@/app/contexts/UserContext'; // SWR fetcher function const fetcher = (url) => fetch(url).then(res => { diff --git a/src/hooks/useKeyboardNav.js b/src/app/hooks/useKeyboardNav.js similarity index 100% rename from src/hooks/useKeyboardNav.js rename to src/app/hooks/useKeyboardNav.js diff --git a/src/app/layout.jsx b/src/app/layout.jsx index 612ddb7d3..21a1200ab 100644 --- a/src/app/layout.jsx +++ b/src/app/layout.jsx @@ -4,7 +4,6 @@ import './globals.css'; import { ClerkProvider } from '@clerk/nextjs'; import { UserProvider } from './contexts/UserContext'; import { LoadingProvider } from './contexts/LoadingContext'; -import { DarkModeProvider } from './contexts/DarkModeContext'; import { AccessibilityProvider } from './contexts/AccessibilityContext'; import MinimalLayout from './MinimalLayout'; @@ -12,40 +11,20 @@ export default function RootLayout({ children }) { return ( - {/* Inline script to prevent dark mode flash of unstyled content */} -