clear all convos in progress, async code refactored in debugging warning

This commit is contained in:
Daniel Avila 2023-02-07 19:07:48 -05:00
parent 053368646d
commit 511ac948b4
10 changed files with 84 additions and 65 deletions

View file

@ -1,14 +1,19 @@
import React from 'react';
export default function NavLink({ svg, text, clickHandler}) {
// const props
// if (clickHandler) {
export default function NavLink({ svg, text, clickHandler }) {
const props = {
className:
'flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10'
};
// }
// return (
// <a {clickHandler && onClick={clickHandler}} className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10">
// {svg()}
// {text}
// </a>
// );
if (clickHandler) {
props.onClick = clickHandler;
}
return (
<a {...props}>
{svg()}
{text}
</a>
);
}