adding clear methods for convos

This commit is contained in:
Daniel Avila 2023-02-06 21:17:46 -05:00
parent c7c50dbbab
commit 6e3f63ee46
16 changed files with 466 additions and 121 deletions

View file

@ -1,8 +1,11 @@
import React from 'react';
import RenameButton from './RenameButton';
import DeleteButton from './DeleteButton';
export default function Conversation({
id,
parentMessageId,
convo,
convoHandler,
title = 'New conversation'
}) {
@ -29,52 +32,8 @@ export default function Conversation({
{title}
</div>
<div className="visible absolute right-1 z-10 flex text-gray-300">
<button className="p-1 hover:text-white">
<svg
stroke="currentColor"
fill="none"
strokeWidth="2"
viewBox="0 0 24 24"
strokeLinecap="round"
strokeLinejoin="round"
className="h-4 w-4"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M12 20h9" />
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" />
</svg>
</button>
<button className="p-1 hover:text-white">
<svg
stroke="currentColor"
fill="none"
strokeWidth="2"
viewBox="0 0 24 24"
strokeLinecap="round"
strokeLinejoin="round"
className="h-4 w-4"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
<line
x1="10"
y1="11"
x2="10"
y2="17"
/>
<line
x1="14"
y1="11"
x2="14"
y2="17"
/>
</svg>
</button>
<RenameButton />
<DeleteButton />
</div>
</a>
);