template delete bug fix and floating display same icon for all floatin
This commit is contained in:
@@ -26,8 +26,12 @@ const Templates = () => {
|
||||
templateData();
|
||||
}, []);
|
||||
|
||||
const handleDeleteTemplate = async (id: string) => {
|
||||
const handleDeleteTemplate = async (
|
||||
e: React.MouseEvent<HTMLButtonElement>,
|
||||
id: string
|
||||
) => {
|
||||
try {
|
||||
e.stopPropagation();
|
||||
const email = localStorage.getItem("email") || "";
|
||||
const organization = email?.split("@")[1]?.split(".")[0];
|
||||
let deleteTemplate = {
|
||||
@@ -108,7 +112,7 @@ const Templates = () => {
|
||||
<RenameInput value={`Template ${index + 1}`} />
|
||||
</div>
|
||||
<button
|
||||
onClick={() => handleDeleteTemplate(template.id)}
|
||||
onClick={(e) => handleDeleteTemplate(e, template.id)}
|
||||
className="delete-button"
|
||||
aria-label="Delete template"
|
||||
>
|
||||
|
||||
@@ -33,7 +33,7 @@ const WidgetsFloating = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="floatingWidgets-wrapper">
|
||||
<div className="floatingWidgets-wrapper widgets-wrapper">
|
||||
{/* {widgets.map((widget) => (
|
||||
<div
|
||||
key={widget.id}
|
||||
@@ -48,24 +48,28 @@ const WidgetsFloating = () => {
|
||||
<SimpleCard
|
||||
header={"Today’s Earnings"}
|
||||
icon={WalletIcon}
|
||||
iconName={"WalletIcon"}
|
||||
value={"$53,000"}
|
||||
per={"+55%"}
|
||||
/>
|
||||
<SimpleCard
|
||||
header={"Today’s Users"}
|
||||
icon={GlobeIcon}
|
||||
iconName={"GlobeIcon"}
|
||||
value={"1,200"}
|
||||
per={"+30%"}
|
||||
/>
|
||||
<SimpleCard
|
||||
header={"New Clients"}
|
||||
icon={DocumentIcon}
|
||||
iconName={"DocumentIcon"}
|
||||
value={"250"}
|
||||
per={"+12%"}
|
||||
/>
|
||||
<SimpleCard
|
||||
header={"Total Sales"}
|
||||
icon={CartIcon}
|
||||
iconName={"CartIcon"}
|
||||
value={"$150,000"}
|
||||
per={"+20%"}
|
||||
/>{" "}
|
||||
|
||||
Reference in New Issue
Block a user