fix: Correct useEffect placement in projection page
- Moved useEffect hook before return statement (proper React component structure) - Was causing Docker build failures with 'Unexpected token' error - useEffect must be inside component function but before JSX return - Build now completes successfully in 71.8s
This commit is contained in:
@@ -22,31 +22,6 @@ export default function ProjectionPage() {
|
||||
const WEEKLY_GROWTH_RATE = 0.50 // 50% per week (proven from database)
|
||||
const START_DATE = new Date('2025-11-24')
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900 p-8">
|
||||
{/* Back to Home Button */}
|
||||
<div className="max-w-7xl mx-auto mb-6">
|
||||
<a
|
||||
href="/"
|
||||
className="inline-flex items-center text-gray-400 hover:text-gray-300 transition-colors duration-200"
|
||||
>
|
||||
<svg
|
||||
className="w-5 h-5 mr-2"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M10 19l-7-7m0 0l7-7m-7 7h18"
|
||||
/>
|
||||
</svg>
|
||||
Back to Dashboard
|
||||
</a>
|
||||
</div>
|
||||
|
||||
useEffect(() => {
|
||||
async function fetchCurrentCapital() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user