chore: monorepo

This commit is contained in:
2023-12-25 14:28:39 +07:00
parent a6da07cd3f
commit 227c2ddefa
374 changed files with 19966 additions and 12758 deletions

View File

@@ -0,0 +1,27 @@
import { WIDGET_KIND } from "@lume/utils";
import { memo } from "react";
import { useProfile } from "../../../hooks/useProfile";
import { useWidget } from "../../../hooks/useWidget";
export const MentionUser = memo(function MentionUser({
pubkey,
}: { pubkey: string }) {
const { user } = useProfile(pubkey);
const { addWidget } = useWidget();
return (
<button
type="button"
onClick={() =>
addWidget.mutate({
kind: WIDGET_KIND.user,
title: user?.name || user?.display_name || user?.displayName,
content: pubkey,
})
}
className="break-words text-blue-500 hover:text-blue-600"
>
{`@${user?.name || user?.displayName || user?.username || "unknown"}`}
</button>
);
});