File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
web/src/components/predictions Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ import UpdateScore from "./update-score";
77
88// generate leaderboard
99const Leaderboard = ( { user } ) => {
10+ const [ admin , adminLoading , adminError ] = useObject (
11+ firebase . database ( ) . ref ( "admins/" + user . uid )
12+ ) ;
13+
1014 const [ names , namesLoading , namesError ] = useObject (
1115 firebase . database ( ) . ref ( "public" )
1216 ) ;
@@ -98,8 +102,8 @@ const Leaderboard = ({ user }) => {
98102 </ Box >
99103 ) }
100104 < Spacer height = { 3 } />
101- { /*if user.uid matches below , then a button is rendered that allows for updating all scores*/ }
102- { user . uid === process . env . ADMIN_USER && < UpdateScore /> }
105+ { /*if user.uid matches any admin uid , then a button is rendered that allows for updating all scores*/ }
106+ { ! adminError && ! adminLoading && admin && < UpdateScore /> }
103107 </ div >
104108 ) ;
105109} ;
You can’t perform that action at this time.
0 commit comments