complete renaming functions, abstracts more svg, sets title to current convo title, adds a try again feature to errors

This commit is contained in:
Daniel Avila 2023-02-11 10:22:15 -05:00
parent 592b7629aa
commit 5af5a97d8f
24 changed files with 512 additions and 82 deletions

View file

@ -1,23 +1,13 @@
import React from 'react';
import RenameIcon from '../svg/RenameIcon';
import CheckMark from '../svg/CheckMark';
export default function RenameButton({ onClick, renaming, renameHandler, onRename }) {
const handler = renaming ? onRename : renameHandler;
export default function RenameButton({ onClick, disabled }) {
return (
<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 className="p-1 hover:text-white" onClick={handler}>
{renaming ? <CheckMark /> : <RenameIcon />}
</button>
);
}