mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 22:23:59 +01:00
reorder delete confirmation button
This commit is contained in:
parent
a3149dc00e
commit
e8c0ddaa96
|
@ -1,4 +1,5 @@
|
|||
import React from 'react';
|
||||
import useStore from '@store/store';
|
||||
|
||||
import Avatar from './Avatar';
|
||||
import MessageContent from './MessageContent';
|
||||
|
@ -24,10 +25,14 @@ const Message = ({
|
|||
messageIndex: number;
|
||||
sticky?: boolean;
|
||||
}) => {
|
||||
const stickyIndex = useStore((state) => state.messages.length);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`w-full border-b border-black/10 dark:border-gray-900/50 text-gray-800 dark:text-gray-100 group ${
|
||||
backgroundStyle[messageIndex % 2]
|
||||
sticky
|
||||
? backgroundStyle[stickyIndex % 2]
|
||||
: backgroundStyle[messageIndex % 2]
|
||||
}`}
|
||||
key={
|
||||
messageIndex !== -1
|
||||
|
|
|
@ -188,15 +188,15 @@ const ContentView = ({
|
|||
)}
|
||||
{isDelete && (
|
||||
<>
|
||||
<button className='p-1 hover:text-white' onClick={handleDelete}>
|
||||
<TickIcon />
|
||||
</button>
|
||||
<button
|
||||
className='p-1 hover:text-white'
|
||||
onClick={() => setIsDelete(false)}
|
||||
>
|
||||
<CrossIcon />
|
||||
</button>
|
||||
<button className='p-1 hover:text-white' onClick={handleDelete}>
|
||||
<TickIcon />
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue