Files
ColdBreeze-chat-web/src/widget/Icon.tsx
T
2022-11-04 17:07:25 +08:00

17 lines
452 B
TypeScript

// import React from "react";
import { useAppSelector } from "../app/store";
type Props = {
handleClick: () => void
};
const Icon = ({ handleClick }: Props) => {
const { logo } = useAppSelector(store => store.server);
if (!logo) return null;
return <button className="rounded-full w-12 h-12 overflow-hidden" onClick={handleClick}>
<img src={logo} alt="logo" className="w-full h-full rounded-full" />
</button>;
};
export default Icon;