diff --git a/components/AppShelf/AddAppShelfItem.tsx b/components/AppShelf/AddAppShelfItem.tsx index 8c8b51120..749e7ab07 100644 --- a/components/AppShelf/AddAppShelfItem.tsx +++ b/components/AppShelf/AddAppShelfItem.tsx @@ -35,67 +35,73 @@ export default function AddItemShelfItem(props: any) { }); return ( <> - setOpened(false)} title="Add a service"> -
- Placeholder setOpened(false)} + title="Add a service" + > +
+ Placeholder +
+
{ + addItem(form.values); + setOpened(false); + form.reset(); + })} + > + + form.setFieldValue('name', event.currentTarget.value)} + error={form.errors.name && 'Invalid name'} /> -
- { - addItem(form.values); - setOpened(false); - form.reset(); - })} - > - - form.setFieldValue('name', event.currentTarget.value)} - error={form.errors.name && 'Invalid name'} - /> - { - form.setFieldValue('icon', event.currentTarget.value); - }} - error={form.errors.icon && 'Icon url is invalid'} - /> - form.setFieldValue('url', event.currentTarget.value)} - error={form.errors.icon && 'Icon url is invalid'} - /> - form.setFieldValue('type', value ?? 'Other')} + data={ServiceTypes} + /> + - - - - + + + +
diff --git a/components/AppShelf/AppShelf.d.ts b/components/AppShelf/AppShelf.d.ts index 612145af3..676062237 100644 --- a/components/AppShelf/AppShelf.d.ts +++ b/components/AppShelf/AppShelf.d.ts @@ -1,12 +1,4 @@ -export const ServiceTypes = [ - 'Other', - 'Sonarr', - 'Radarr', - 'Lidarr', - 'qBittorrent', - 'Plex', - 'Emby', -]; +export const ServiceTypes = ['Other', 'Sonarr', 'Radarr', 'Lidarr', 'qBittorrent', 'Plex', 'Emby']; export interface serviceItem { [x: string]: any; diff --git a/components/AppShelf/AppShelf.story.tsx b/components/AppShelf/AppShelf.story.tsx index 6f9687513..6657c4918 100644 --- a/components/AppShelf/AppShelf.story.tsx +++ b/components/AppShelf/AppShelf.story.tsx @@ -4,6 +4,4 @@ export default { title: 'Item Shelf', }; -export const Default = (args: any) => ( - -); +export const Default = (args: any) => ; diff --git a/components/Config/SaveConfig.tsx b/components/Config/SaveConfig.tsx index a507d53ad..7fbf3e951 100644 --- a/components/Config/SaveConfig.tsx +++ b/components/Config/SaveConfig.tsx @@ -11,8 +11,8 @@ export default function SaveConfigComponent(props: any) { } } return ( - + ); } diff --git a/components/Settings/SettingsMenu.tsx b/components/Settings/SettingsMenu.tsx index 4420aedb4..8b45d8841 100644 --- a/components/Settings/SettingsMenu.tsx +++ b/components/Settings/SettingsMenu.tsx @@ -20,12 +20,10 @@ function SettingsMenu(props: any) { }, []); return ( - { + onChange={(e) => { setConfig({ ...config, searchUrl: e.target.value, @@ -37,8 +35,7 @@ function SettingsMenu(props: any) { searchUrl: e.target.value, }) ); - } - } + }} />