File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
web/src/components/predictions Expand file tree Collapse file tree 1 file changed +5
-1
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 ) ;
@@ -99,7 +103,7 @@ const Leaderboard = ({ user }) => {
99103 ) }
100104 < Spacer height = { 3 } />
101105 { /*if user.uid matches below, then a button is rendered that allows for updating all scores*/ }
102- { user . uid === process . env . ADMIN_USER && < UpdateScore /> }
106+ { ! adminError && ! adminLoading && admin && < UpdateScore /> }
103107 </ div >
104108 ) ;
105109} ;
You can’t perform that action at this time.
0 commit comments