💃🏻 Typing, Styling, Formatting

This commit is contained in:
ajnart
2022-08-02 00:21:11 +02:00
parent eff2fc5ac7
commit 4e75605ac0
3 changed files with 7 additions and 7 deletions

View File

@@ -1,10 +1,7 @@
import { Group, Text, useMantineTheme, MantineTheme } from '@mantine/core'; import { Group, Text, useMantineTheme } from '@mantine/core';
import { import {
IconUpload as Upload,
IconPhoto as Photo,
IconX as X, IconX as X,
IconCheck as Check, IconCheck as Check,
TablerIcon,
IconX, IconX,
IconPhoto, IconPhoto,
IconUpload, IconUpload,

View File

@@ -1,4 +1,4 @@
import { Group, Stack, Text, Title } from '@mantine/core'; import { Group, Text, Title } from '@mantine/core';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { IconClock as Clock } from '@tabler/icons'; import { IconClock as Clock } from '@tabler/icons';
@@ -36,7 +36,7 @@ export default function DateComponent(props: any) {
return ( return (
<Group p="sm" spacing="xs"> <Group p="sm" spacing="xs">
<Title>{dayjs(date).format(formatString)}</Title> <Title>{dayjs(date).format(formatString)}</Title>
<Text size="xl">{dayjs(date).format('dddd, MMMM D')}</Text> <Text size="lg">{dayjs(date).format('dddd, MMMM D')}</Text>
</Group> </Group>
); );
} }

View File

@@ -84,7 +84,10 @@ export type ServiceType =
| 'Sonarr' | 'Sonarr'
| 'Transmission'; | 'Transmission';
export function tryMatchPort(name: string, form?: any) { export function tryMatchPort(name: string | undefined, form?: any) {
if (!name) {
return undefined;
}
// Match name with portmap key // Match name with portmap key
const port = portmap.find((p) => p.name === name.toLowerCase()); const port = portmap.find((p) => p.name === name.toLowerCase());
if (form && port) { if (form && port) {