forked from VinokurovVE/tests
Layout, Pages, Dashboard, MUI
This commit is contained in:
23
frontend_reactjs/src/pages/ApiTest.tsx
Normal file
23
frontend_reactjs/src/pages/ApiTest.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import { useEffect, useState } from "react"
|
||||
import UserService from "../services/UserService"
|
||||
import AuthService from "../services/AuthService"
|
||||
import { Button } from "@mui/material"
|
||||
|
||||
export default function ApiTest() {
|
||||
const [temp, setTemp] = useState<any>(null)
|
||||
|
||||
const hello = async () => {
|
||||
await AuthService.hello().then(response => {
|
||||
setTemp(response)
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>{JSON.stringify(temp)}</div>
|
||||
<Button onClick={() => hello()}>
|
||||
Hello
|
||||
</Button>
|
||||
</>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user