mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-07-28 17:53:21 +08:00
chore: remove user store
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { marked } from "marked";
|
||||
import { useUserStore } from "../../store";
|
||||
import { localUser } from "../../store";
|
||||
import { Message } from "../../types";
|
||||
|
||||
interface Props {
|
||||
@ -8,9 +8,7 @@ interface Props {
|
||||
|
||||
const MessageView = (props: Props) => {
|
||||
const message = props.message;
|
||||
const userStore = useUserStore();
|
||||
const currentUser = userStore.currentUser;
|
||||
const isCurrentUser = message.creatorId === currentUser.id;
|
||||
const isCurrentUser = message.creatorId === localUser.id;
|
||||
|
||||
return (
|
||||
<div className={`w-full flex flex-row justify-start items-start my-4 ${isCurrentUser ? "justify-end pl-8 sm:pl-24" : "pr-8 sm:pr-24"}`}>
|
||||
|
Reference in New Issue
Block a user