Commit Graph

16 Commits

Author SHA1 Message Date
df8ebbfd47 move fetch to useEffect
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 6m25s
2026-03-04 22:40:33 +01:00
b0b8968fb2 use client for fetch data
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 5m51s
2026-03-04 22:23:49 +01:00
5a116eabe7 update request model rewiring
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 3m46s
2026-03-01 16:45:30 +01:00
3004545400 fix FL points defaulting to 1
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 4m3s
2026-03-01 15:07:45 +01:00
8b3d8bc817 Configure env variables for Gitea Actions build step
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 3m26s
Add secrets to build step in deploy.yaml:
- NEXT_PUBLIC_API_BASE
- SERVER_ID
- ACCESS_TOKEN

These are baked into static export during build, not needed by Cloudflare.
2026-03-01 14:50:45 +01:00
fb339c57de Use non-public env variables for sensitive credentials
- NEXT_PUBLIC_API_BASE: Keep public (just the endpoint URL)
- SERVER_ID: Remove NEXT_PUBLIC_ prefix (private identifier)
- ACCESS_TOKEN: Remove NEXT_PUBLIC_ prefix (sensitive credential)

Since fetching is server-side, credentials never reach the browser.
Only API_BASE needs to be public if accessed from client in future.
2026-03-01 14:50:25 +01:00
2da1b150ed Move leaderboard fetching to server-side
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 4m3s
- Create src/lib/api.ts with fetchLeaderboard function for server use
- Update page.tsx to async component that fetches data at build/request time
- Pass fetched data to ClientPage as initialAppData prop
- Remove client-side useEffect and state management from ClientPage
- Reduce client bundle size (4.07kb → 2.99kb)
- Improve security by keeping API credentials server-only
2026-03-01 14:28:31 +01:00
a096075d8c Extract client logic to separate ClientPage component
- Create ClientPage.tsx with 'use client' and all stateful logic
- Simplify page.tsx to just import and render ClientPage
- Allows easy switching between client/server rendering strategies
- Maintains same functionality with cleaner separation of concerns
2026-03-01 14:26:15 +01:00
6c9a5ea7a6 Port to Next.js with static export for Cloudflare Pages
- Create Next.js app with TypeScript, Tailwind, and Postcss
- Extract API logic, types, and utilities to lib/
- Build React components for Race Results, Driver Standings, Points Key, and D3 Chart
- Use environment variables for API credentials (NEXT_PUBLIC_*)
- Static export (output: 'export') for Cloudflare Pages deployment
- D3 chart rendered client-side with dynamic import
- Update deploy workflow to build and deploy ./out directory
- Remove original public/index.html
2026-03-01 14:21:02 +01:00
04552e1eee update to public endpoint
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 3m30s
2026-03-01 13:53:16 +01:00
dd34ec9b9c fetch leaderboard from server
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 5m13s
2026-02-28 17:59:49 +01:00
63ae146fd0 update actions
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 1m8s
2026-02-06 20:39:01 +01:00
34b4e5d637 update deploy.yaml
Some checks failed
Deploy to Cloudflare Pages / deploy (push) Failing after 2m42s
2026-02-06 20:28:15 +01:00
c0364e73ad add actions
Some checks failed
Deploy to Cloudflare Pages / deploy (push) Failing after 34s
2026-02-06 19:33:06 +01:00
69e30a2d6e update leaderboard 2026-01-12 18:51:06 +01:00
651bdd3269 init 2025-11-17 00:30:51 +01:00