add: added a pig

This commit is contained in:
Lukian 2025-04-06 22:48:15 +02:00
parent 39193af2d6
commit 477fff18fd
4 changed files with 10 additions and 1 deletions

BIN
front/public/pig.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View file

@ -23,6 +23,11 @@ export default function MessageComponent({ message, user, channel, deleteMessage
return <span key={index}>{word} </span>;
})}
<p>{new Date(message.date * 1000).toLocaleString()}</p>
<div>
{message.content.toLocaleLowerCase().includes("gros cochon") && (
<img src="/pig.png" alt="Gros cochon" className="pig" />
)}
</div>
{channel && deleteMessage ? (
user?.id === message.user_id || user?.id === channel?.owner_id || user?.admin === 1) && (
<button onClick={() => {deleteMessage(message.id)}}>Delete</button>

View file

@ -8,4 +8,8 @@ html {
.osaka {
width: 200px;
}
.pig {
width: 100px;
}

View file

@ -1,7 +1,7 @@
.channel-page {
display: flex;
flex-direction: column;
justify-content: center;
justify-content: start;
align-items: center;
width: 100%;
min-height: 100vh;