diff --git a/packages/client/src/pages/seasons/WeightAdjustment.page.tsx b/packages/client/src/pages/seasons/WeightAdjustment.page.tsx
index f2aed5b..b8f138d 100644
--- a/packages/client/src/pages/seasons/WeightAdjustment.page.tsx
+++ b/packages/client/src/pages/seasons/WeightAdjustment.page.tsx
@@ -2,8 +2,11 @@ import { Alert, AlertDescription, AlertIcon, Button, Heading, HStack, SimpleGrid
import { useMemo } from 'react'
import { FaEdit, FaMedal, FaRedoAlt } from 'react-icons/fa'
import { useNavigate, useParams } from 'react-router-dom'
+import { useAuthContext } from 'src/api/contexts/useAuthContext'
import { useFetchSeasonWeights } from 'src/api/hooks/seasonHooks'
import { LoadingSpinner } from 'src/components/commons/LoadingSpinner'
+import { LoginNavigate } from 'src/components/commons/LoginNavigate'
+import { NavigateWithError } from 'src/components/commons/NavigateWithError'
import { criterionWeightReducer } from 'src/util/criterionWeightHelper'
import { PATHS } from 'src/util/paths'
import { CategoryWeights } from './components/CategoryWeights'
@@ -11,8 +14,9 @@ import { SourceSeasonSelectorModal } from './components/SourceSeasonSelectorModa
export const WeightAdjustmentPage = () => {
const { seasonId } = useParams()
- const { isLoading, data } = useFetchSeasonWeights(seasonId)
+ const { isLoading, data, error } = useFetchSeasonWeights(seasonId)
const nav = useNavigate()
+ const { isLoggedIn } = useAuthContext()
const totalWeightSum = useMemo(() => {
if (!data) return 0
@@ -28,6 +32,13 @@ export const WeightAdjustmentPage = () => {
}, 0)
}, [data])
+ if (!isLoggedIn) {
+ return
+ }
+ if (error) {
+ return
+ }
+
if (isLoading || !data) return
return (