diff --git a/frontend/src/components/PlayerSelect.tsx b/frontend/src/components/PlayerSelect.tsx
index 8e4afeb..8c9612e 100644
--- a/frontend/src/components/PlayerSelect.tsx
+++ b/frontend/src/components/PlayerSelect.tsx
@@ -16,7 +16,7 @@ export function PlayerSelect({
}: {
value: number | "";
options: PlayerSuggestion[];
- onPick: (userId: number | "") => void;
+ onPick: (userId: number) => void;
}) {
const [open, setOpen] = useState(false);
const selected = value === "" ? null : options.find((o) => o.user_id === value) ?? null;
@@ -48,14 +48,6 @@ export function PlayerSelect({
onPick(u.user_id);
setOpen(false);
}}
- onClear={
- selected
- ? () => {
- onPick("");
- setOpen(false);
- }
- : undefined
- }
/>
)}
diff --git a/frontend/src/components/PlayerSuggestions.tsx b/frontend/src/components/PlayerSuggestions.tsx
index 1c165ac..feb078d 100644
--- a/frontend/src/components/PlayerSuggestions.tsx
+++ b/frontend/src/components/PlayerSuggestions.tsx
@@ -14,28 +14,13 @@ export interface PlayerSuggestion {
export function PlayerSuggestions({
items,
onPick,
- onClear,
}: {
items: PlayerSuggestion[];
onPick: (item: PlayerSuggestion) => void;
- // Необязательная строка сброса сверху списка («— игрок —» в PlayerSelect).
- onClear?: () => void;
}) {
- if (items.length === 0 && !onClear) return null;
+ if (items.length === 0) return null;
return (
- {onClear && (
-
- )}
{items.map((u) => (