'use client'
import { Button } from "@mui/material"
import axios from "axios"

const Page = () => {
    const handler = () => {
        try {
            axios.get('https://rms.witel.ir/test_login?username=witel', { withCredentials: true })
        } catch (error) {
            console.log(error);
        }
    }
    const handler2 = () => {
        try {
            const res = axios.get('https://rms.witel.ir/webapi/user/get-permission', { withCredentials: true })
            console.log(res);
        } catch (error) {
            console.log(error);
        }
    }
    return (
        <>
            <Button onClick={handler}>login</Button>
            <Button onClick={handler2}>check</Button>
        </>
    )
}

export default Page