small fixes
This commit is contained in:
@@ -23,5 +23,5 @@ export * from './kinds/sub';
|
||||
export * from './skeleton';
|
||||
export * from './actions';
|
||||
export * from './content';
|
||||
export * from './hashtag';
|
||||
export * from './mentions/hashtag';
|
||||
export * from './stats';
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { useStorage } from '@libs/storage/provider';
|
||||
|
||||
import { widgetKinds } from '@stores/constants';
|
||||
import { useWidgets } from '@stores/widgets';
|
||||
|
||||
export function Hashtag({ tag }: { tag: string }) {
|
||||
const { db } = useStorage();
|
||||
const setWidget = useWidgets((state) => state.setWidget);
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
setWidget({
|
||||
setWidget(db, {
|
||||
kind: widgetKinds.hashtag,
|
||||
title: tag,
|
||||
content: tag.replace('#', ''),
|
||||
@@ -1,3 +1,5 @@
|
||||
import { useStorage } from '@libs/storage/provider';
|
||||
|
||||
import { widgetKinds } from '@stores/constants';
|
||||
import { useWidgets } from '@stores/widgets';
|
||||
|
||||
@@ -5,14 +7,16 @@ import { useProfile } from '@utils/hooks/useProfile';
|
||||
import { displayNpub } from '@utils/shortenKey';
|
||||
|
||||
export function MentionUser({ pubkey }: { pubkey: string }) {
|
||||
const { db } = useStorage();
|
||||
const { user } = useProfile(pubkey);
|
||||
|
||||
const setWidget = useWidgets((state) => state.setWidget);
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
setWidget({
|
||||
setWidget(db, {
|
||||
kind: widgetKinds.user,
|
||||
title: user?.nip05 || user?.name || user?.display_name,
|
||||
content: pubkey,
|
||||
|
||||
Reference in New Issue
Block a user