diff --git a/src/app/content/components/DanmakuMessage.tsx b/src/app/content/components/DanmakuMessage.tsx index 6b0a623..dde5bad 100644 --- a/src/app/content/components/DanmakuMessage.tsx +++ b/src/app/content/components/DanmakuMessage.tsx @@ -1,9 +1,5 @@ import { Avatar, AvatarFallback } from '@/components/ui/Avatar' import { Button } from '@/components/ui/Button' -import { APP_STATUS_STORAGE_KEY } from '@/constants/config' -import { EVENT } from '@/constants/event' -import { AppStatus } from '@/domain/AppStatus' -import { LocalStorageImpl } from '@/domain/impls/Storage' import { TextMessage } from '@/domain/Room' import { cn } from '@/utils' import { AvatarImage } from '@radix-ui/react-avatar' @@ -12,22 +8,17 @@ import { FC, MouseEvent } from 'react' export interface PromptItemProps { data: TextMessage className?: string + onClick?: (e: MouseEvent) => void onMouseEnter?: (e: MouseEvent) => void onMouseLeave?: (e: MouseEvent) => void } -const DanmakuMessage: FC = ({ data, className, onMouseEnter, onMouseLeave }) => { - const handleOpenApp = async () => { - const appStatus = await LocalStorageImpl.value.get(APP_STATUS_STORAGE_KEY) - LocalStorageImpl.value.set(APP_STATUS_STORAGE_KEY, { ...appStatus!, open: true, unread: 0 }) - dispatchEvent(new CustomEvent(EVENT.APP_OPEN)) - } - +const DanmakuMessage: FC = ({ data, className, onClick, onMouseEnter, onMouseLeave }) => { return (