From e57ab8bf7ee5dff3a84d202f2f732a5b58f60ce1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 10 Feb 2026 14:22:34 +0000 Subject: [PATCH] Update SmartPlugCard to use i18n translations Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com> --- frontend/src/components/SmartPlugCard.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/SmartPlugCard.tsx b/frontend/src/components/SmartPlugCard.tsx index a2569c220..29c19f3f2 100644 --- a/frontend/src/components/SmartPlugCard.tsx +++ b/frontend/src/components/SmartPlugCard.tsx @@ -1,6 +1,7 @@ import { useState } from 'react'; import { useMutation, useQueryClient, useQuery } from '@tanstack/react-query'; import { Plug, Power, PowerOff, Loader2, Trash2, Settings2, Thermometer, Clock, Wifi, WifiOff, Edit2, Bell, Calendar, LayoutGrid, ExternalLink, Home, Radio, Eye } from 'lucide-react'; +import { useTranslation } from 'react-i18next'; import { api } from '../api/client'; import type { SmartPlug, SmartPlugUpdate } from '../api/client'; import { Card, CardContent } from './Card'; @@ -14,6 +15,7 @@ interface SmartPlugCardProps { } export function SmartPlugCard({ plug, onEdit }: SmartPlugCardProps) { + const { t } = useTranslation(); const queryClient = useQueryClient(); const { showToast } = useToast(); const [showDeleteConfirm, setShowDeleteConfirm] = useState(false); @@ -171,7 +173,7 @@ export function SmartPlugCard({ plug, onEdit }: SmartPlugCardProps) { ) : (