@@ -32,6 +32,8 @@ import { getTeamByChallenge, getUserInvitesByChallenge } from "@/store/services/
32
32
import { fetchChallenge , fetchChallengeAuthenticated } from "@/store/services/communities/challenges" ;
33
33
import Loader from "@/components/ui/Loader" ;
34
34
import { NotFoundError } from "@/utilities/errors/NotFoundError" ;
35
+ import Hint from "@/components/ui/Hint" ;
36
+ import Link from "next/link" ;
35
37
36
38
/**
37
39
* interface for ChallengePage multiSelector
@@ -75,7 +77,6 @@ export default function ChallengePage(props: {
75
77
isAuthenticated : ( state : IRootState ) => authCheck ( state ) ,
76
78
isSubmissionLoading : ( state : IRootState ) => state . challenges . loading ,
77
79
} ) ;
78
-
79
80
const title = useMemo ( ( ) => getMetadataTitle ( t ( "communities.challenge.title" ) , challenge ?. name || "" ) , [ challenge ?. name , t ] ) ;
80
81
81
82
const navigation = useNavigation ( ) ;
@@ -109,7 +110,7 @@ export default function ChallengePage(props: {
109
110
< RatingRubric ratingCriteria = { challenge ?. ratingCriteria } selected = { [ ] } />
110
111
< BestSubmissions />
111
112
112
- { isAuthenticated && (
113
+ { isAuthenticated ? (
113
114
< div >
114
115
{ isSubmissionLoading ? (
115
116
< div className = "h-24 sm:h-48 grid place-items-center" >
@@ -131,6 +132,15 @@ export default function ChallengePage(props: {
131
132
</ >
132
133
) }
133
134
</ div >
135
+ ) : (
136
+ < div >
137
+ < Hint className = "mt-6 flex flex-col md:flex-row" >
138
+ < p > To be able to submit</ p >
139
+ < Link className = "underline" href = "/login" >
140
+ Login.
141
+ </ Link >
142
+ </ Hint >
143
+ </ div >
134
144
) }
135
145
</ div >
136
146
</ Wrapper >
0 commit comments