diff --git a/apps/desktop/src/components/settings/views/templates.tsx b/apps/desktop/src/components/settings/views/templates.tsx index fddbd77df7..5dbee38d55 100644 --- a/apps/desktop/src/components/settings/views/templates.tsx +++ b/apps/desktop/src/components/settings/views/templates.tsx @@ -7,7 +7,7 @@ import { Button } from "@hypr/ui/components/ui/button"; import { cn } from "@hypr/ui/lib/utils"; import { Trans } from "@lingui/react/macro"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { ArrowLeftIcon, EditIcon, EyeIcon, Loader2Icon, PlusIcon } from "lucide-react"; +import { ArrowLeftIcon, CheckIcon, Loader2Icon, PlusIcon } from "lucide-react"; import { useEffect, useState } from "react"; import TemplateEditor from "./template"; @@ -353,12 +353,12 @@ function TemplateCard({ template, onSelect, onEdit, onClone, onDelete, emoji, is }; const handleCardClick = () => { - onSelect(); + onEdit?.(); }; - const handleEditClick = (e: React.MouseEvent) => { + const handleSetDefaultClick = (e: React.MouseEvent) => { e.stopPropagation(); - onEdit?.(); + onSelect(); }; // Function to truncate text @@ -369,9 +369,6 @@ function TemplateCard({ template, onSelect, onEdit, onClone, onDelete, emoji, is return text.substring(0, maxLength).trim() + "..."; }; - // Check if this is a built-in template - const isBuiltinTemplate = !TemplateService.canEditTemplate(template.id); - return (