You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
509 B

import { Button } from "antd";
import { LogoutOutlined } from "@ant-design/icons";
import { setAuth } from "./stores/auth";
import { api } from "./api";
export function SignOut() {
return (
<div className="absolute top-[20px] right-[20px]">
<Button
icon={<LogoutOutlined />}
type="primary"
size="large"
title="Выйти"
onClick={async () => {
await api.post("accounts/logout/");
setAuth(false);
}}
/>
</div>
);
}