🚑 Critical hotfix for various bugs

This commit is contained in:
ajnart
2022-05-26 00:10:48 +02:00
parent c725559e9b
commit 1ec8f1db19
5 changed files with 2 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ export default function ConfigChanger() {
useEffect(() => { useEffect(() => {
getConfigs().then((configs) => setConfigList(configs)); getConfigs().then((configs) => setConfigList(configs));
// setConfig(initialConfig); // setConfig(initialConfig);
}, [config.name]); }, [config]);
// If configlist is empty, return a loading indicator // If configlist is empty, return a loading indicator
if (configList.length === 0) { if (configList.length === 0) {
return ( return (

View File

@@ -44,7 +44,6 @@ export default function SaveConfigComponent(props: any) {
> >
<TextInput <TextInput
required required
defaultValue={config.name}
label="Config name" label="Config name"
placeholder="Your new config name" placeholder="Your new config name"
{...form.getInputProps('configName')} {...form.getInputProps('configName')}

View File

@@ -1,16 +0,0 @@
import { Select } from '@mantine/core';
import { useState } from 'react';
export default function SelectConfig(props: any) {
const [value, setValue] = useState<string | null>('');
return (
<Select
value={value}
onChange={setValue}
data={[
{ value: 'default', label: 'Default' },
{ value: 'yourmom', label: 'Your mom' },
]}
/>
);
}

View File

@@ -94,7 +94,6 @@ export function ReadarrMediaDisplay(props: any) {
} }
const baseUrl = new URL(readarr.url).origin; const baseUrl = new URL(readarr.url).origin;
// Remove '/' from the end of the lidarr url // Remove '/' from the end of the lidarr url
console.log(poster);
const fullLink = `${baseUrl}${poster.url}`; const fullLink = `${baseUrl}${poster.url}`;
// Return a movie poster containting the title and the description // Return a movie poster containting the title and the description
return ( return (

View File

@@ -51,7 +51,7 @@ export function ConfigProvider({ children }: Props) {
async function loadConfig(configName: string) { async function loadConfig(configName: string) {
try { try {
const response = await axios.get(`/api/configs/${configName}`); const response = await axios.get(`/api/configs/${configName}`);
setConfigInternal(response.data); setConfigInternal(JSON.parse(response.data));
showNotification({ showNotification({
title: 'Config', title: 'Config',
icon: <Check />, icon: <Check />,