🐛 Fixing small bugs

This commit is contained in:
ajnart
2022-08-10 13:59:46 +02:00
parent 901b68732f
commit 430f3b52e9
5 changed files with 495 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ function MatchService(name: string, form: any) {
}
}
const DEFAULT_ICON = '/favicon.svg';
const DEFAULT_ICON = '/favicon.png';
export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & any) {
const { setOpened } = props;
@@ -135,7 +135,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
const [debounced, cancel] = useDebouncedValue(form.values.name, 250);
useEffect(() => {
if (form.values.name !== debounced || form.values.icon !== DEFAULT_ICON) return;
if (form.values.name !== debounced || form.values.icon !== DEFAULT_ICON || form.values.type !== 'Other') return;
MatchIcon(form.values.name, form);
MatchService(form.values.name, form);
tryMatchPort(form.values.name, form);