mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-06 21:22:36 +00:00
feat: implement custom branding
This commit is contained in:
23
frontend/web/src/components/Logo.tsx
Normal file
23
frontend/web/src/components/Logo.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import classNames from "classnames";
|
||||
import { useWorkspaceStore } from "@/stores";
|
||||
import Icon from "./Icon";
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const Logo = ({ className }: Props) => {
|
||||
const workspaceStore = useWorkspaceStore();
|
||||
const branding = workspaceStore.setting.branding ? new TextDecoder().decode(workspaceStore.setting.branding) : "";
|
||||
return (
|
||||
<div className={classNames("w-8 h-auto dark:text-gray-500 rounded-lg overflow-hidden", className)}>
|
||||
{branding ? (
|
||||
<img src={branding} alt="branding" className="max-w-full max-h-full" />
|
||||
) : (
|
||||
<Icon.CircleSlash className="w-full h-auto" strokeWidth={1.5} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Logo;
|
Reference in New Issue
Block a user