File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,10 @@ import Blogs from "./components/Blogs";
1414import { trpc } from "../utils/trpc" ;
1515
1616const secret : NextPage = ( ) => {
17-
1817 const [ isAdmin , setIsAdmin ] = useState < boolean > ( false ) ;
19- const [ password , setPassword ] = useState < string > ( "" )
18+ const [ password , setPassword ] = useState < string > ( "" ) ;
2019
21- const clickHandler = ( e : any ) => {
20+ const clickHandler = ( ) => {
2221 if ( process . env . NEXT_PUBLIC_ADMIN_PASSWORD === password ) {
2322 setIsAdmin ( true ) ;
2423 }
@@ -35,7 +34,7 @@ const secret: NextPage = () => {
3534 placeholder = "password"
3635 className = "block w-50 rounded-md border border-gray-300 px-5 py-3 text-base text-gray-900 placeholder-gray-500 shadow-sm focus:border-rose-500 focus:ring-rose-500 mr-8" >
3736 </ input >
38- < button onClick = { e => clickHandler ( e ) } className = "blockrounded-md border rounded border-transparent bg-rose-500 px-5 py-3 text-base font-medium text-white shadow hover:bg-rose-600 focus:outline-none focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 sm:px-10" > Submit</ button >
37+ < button onClick = { clickHandler } className = "blockrounded-md border rounded border-transparent bg-rose-500 px-5 py-3 text-base font-medium text-white shadow hover:bg-rose-600 focus:outline-none focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 sm:px-10" > Submit</ button >
3938 </ div > }
4039 { isAdmin && < div > You logged in!</ div > }
4140
You can’t perform that action at this time.
0 commit comments