forked from VinokurovVE/tests
23 lines
580 B
TypeScript
23 lines
580 B
TypeScript
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>
|
|
</>
|
|
)
|
|
} |