Files
tests/frontend_reactjs/src/pages/ApiTest.tsx
2024-06-20 16:59:59 +09:00

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>
</>
)
}