Skip to content

Commit 8c6d7af

Browse files
committed
eslint
1 parent e096c88 commit 8c6d7af

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

src/components/SettingsPanel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { RadioGroup, Listbox } from '@headlessui/react';
44
import { Cog6ToothIcon } from '@heroicons/react/24/outline';
55
import { ChevronUpDownIcon } from '@heroicons/react/20/solid';
66
import { useTranslations, useLocale } from 'next-intl';
7-
import { useRouter, usePathname, useSearchParams } from 'next/navigation';
7+
import { useRouter, usePathname } from 'next/navigation';
88

99
type EncryptionType = 'WPA' | 'WPA2' | 'WPA3' | 'WEP' | 'nopass';
1010

@@ -60,7 +60,6 @@ export default function SettingsPanel({
6060
const locale = useLocale() as LocaleType;
6161
const router = useRouter();
6262
const pathname = usePathname();
63-
const searchParams = useSearchParams();
6463

6564
const switchLocale = (newLocale: LocaleType) => {
6665
const params = new URLSearchParams();

src/components/WiFiCard.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Instructions from './Instructions';
1010

1111
type EncryptionType = 'WPA' | 'WPA2' | 'WPA3' | 'WEP' | 'nopass';
1212
type TemplateType = 'default' | 'restaurant' | 'hotel' | 'hospital' | 'office';
13-
type SceneType = 'hotel' | 'restaurant' | 'hospital' | 'office';
1413

1514
interface WiFiCardProps {
1615
scene?: string | null;
@@ -33,13 +32,6 @@ export default function WiFiCard({ scene }: WiFiCardProps) {
3332
}
3433
return 'default';
3534
});
36-
const [templateStyles, setTemplateStyles] = useState<Record<TemplateType, { title: string; description: string }>>({
37-
default: { title: '', description: '' },
38-
restaurant: { title: '', description: '' },
39-
hotel: { title: '', description: '' },
40-
hospital: { title: '', description: '' },
41-
office: { title: '', description: '' },
42-
});
4335

4436
// 根据场景设置模板和标题
4537
useEffect(() => {
@@ -180,12 +172,6 @@ export default function WiFiCard({ scene }: WiFiCardProps) {
180172
setSsid(newSsid);
181173
setPassword(newPassword);
182174
}}
183-
onTemplateStyleUpdate={(newTitle, newDescription) => {
184-
setTemplateStyles((prev: Record<TemplateType, { title: string; description: string }>) => ({
185-
...prev,
186-
[template]: { title: newTitle, description: newDescription }
187-
}));
188-
}}
189175
/>
190176
</div>
191177
</div>

src/components/WifiPreviewCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function WifiPreviewCard({ ssid, password, hidePassword, qrValue, template, onUp
3838
description: isEditing ? editedDescription : t(`templates.${template}.description`),
3939
icon: TEMPLATE_ICONS[template],
4040
textColor: 'text-gray-900',
41-
}), [template, isEditing, editedTitle, editedDescription, t]);
41+
}), [template, isEditing, editedTitle, editedDescription, t, TEMPLATE_ICONS]);
4242

4343
useEffect(() => {
4444
setEditedTitle(t(`templates.${template}.title`));

0 commit comments

Comments
 (0)