🚑 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(() => {
getConfigs().then((configs) => setConfigList(configs));
// setConfig(initialConfig);
}, [config.name]);
}, [config]);
// If configlist is empty, return a loading indicator
if (configList.length === 0) {
return (

View File

@@ -44,7 +44,6 @@ export default function SaveConfigComponent(props: any) {
>
<TextInput
required
defaultValue={config.name}
label="Config name"
placeholder="Your new config name"
{...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;
// Remove '/' from the end of the lidarr url
console.log(poster);
const fullLink = `${baseUrl}${poster.url}`;
// Return a movie poster containting the title and the description
return (

View File

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