format stuff

This commit is contained in:
Johannes Kirschbauer
2023-11-04 14:02:32 +01:00
parent a34d5d20e0
commit 92eebd7ea7
4 changed files with 7 additions and 5 deletions

View File

@@ -64,7 +64,9 @@ export default function RootLayout({
<AppContext.Consumer> <AppContext.Consumer>
{(appState) => { {(appState) => {
const showSidebarDerived = Boolean( const showSidebarDerived = Boolean(
showSidebar && !appState.isLoading && appState.data.isJoined showSidebar &&
!appState.isLoading &&
appState.data.isJoined,
); );
return ( return (
<> <>

View File

@@ -41,7 +41,7 @@ export default function ClanModules(props: ClanModulesProps) {
}, [clanName, formHooks]); }, [clanName, formHooks]);
const handleChange = ( const handleChange = (
event: SelectChangeEvent<CreateMachineForm["modules"]> event: SelectChangeEvent<CreateMachineForm["modules"]>,
) => { ) => {
const { const {
target: { value }, target: { value },

View File

@@ -44,7 +44,7 @@ export function CustomConfig(props: FormStepContentProps) {
} }
return acc; return acc;
}, {}), }, {}),
[schema] [schema],
); );
return ( return (
@@ -109,7 +109,7 @@ function PureCustomConfig(props: PureCustomConfigProps) {
message: "invalid config", message: "invalid config",
}); });
toast.error( toast.error(
"Configuration is invalid. Please check the highlighted fields for details." "Configuration is invalid. Please check the highlighted fields for details.",
); );
} else { } else {
formHooks.clearErrors("config"); formHooks.clearErrors("config");

View File

@@ -72,7 +72,7 @@ export const MachineContextProvider = (props: MachineContextProviderProps) => {
if (!isLoading && !error && !isValidating && rawData) { if (!isLoading && !error && !isValidating && rawData) {
const { machines } = rawData.data; const { machines } = rawData.data;
return machines.filter((m) => return machines.filter((m) =>
filters.every((f) => m[f.name] === f.value) filters.every((f) => m[f.name] === f.value),
); );
} }
return []; return [];