feat: widget sdk

This commit is contained in:
Tristan Yang
2022-10-27 21:21:54 +08:00
parent 23320ab637
commit 1987c257ba
25 changed files with 456 additions and 96 deletions
+16
View File
@@ -0,0 +1,16 @@
// 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" onClick={handleClick}>
<img src={logo} alt="logo" className="w-full h-full" />
</button>;
};
export default Icon;