Fix some biome lints (#93678)

## About The Pull Request

Fix unused imports in AI display picker files and unnecessary fragment
in newspaper file

## Why It's Good For The Game

Lint warning fix

## Changelog

No
This commit is contained in:
Roxy
2025-10-31 14:33:01 +01:00
committed by GitHub
parent 916c2724f0
commit 7e0ab4dd1b
3 changed files with 19 additions and 43 deletions
@@ -1,16 +1,13 @@
import { useState } from 'react';
import {
Box,
Button,
DmIcon,
Flex,
ImageButton,
Input,
Section,
Stack,
Table,
DmIcon,
} from 'tgui-core/components';
import { classes } from 'tgui-core/react';
import { useBackend } from '../backend';
import { Window } from '../layouts';
@@ -50,7 +47,7 @@ const AiCoreDisplayPickerContent = () => {
// Filter options based on search term
const filteredOptions = options.filter((option) =>
option.name.toLowerCase().includes(searchTerm.toLowerCase())
option.name.toLowerCase().includes(searchTerm.toLowerCase()),
);
return (
@@ -65,7 +62,7 @@ const AiCoreDisplayPickerContent = () => {
border: '2px solid #4a9eff',
borderRadius: '4px',
backgroundColor: '#1a1a1a',
padding: '8px'
padding: '8px',
}}
>
<DmIcon
@@ -99,9 +96,7 @@ const AiCoreDisplayPickerContent = () => {
<Stack fill vertical>
<Stack.Item>
<Section title="AI Core Display Options">
<OptionsList
options={filteredOptions}
/>
<OptionsList options={filteredOptions} />
</Section>
</Stack.Item>
@@ -114,17 +109,11 @@ const AiCoreDisplayPickerContent = () => {
)}
</Stack>
</Stack.Item>
</Stack>
);
};
const OptionsList = ({
options,
}: {
options: CoreDisplayOption[];
}) => {
const OptionsList = ({ options }: { options: CoreDisplayOption[] }) => {
const { act } = useBackend<Data>();
return (
@@ -1,15 +1,14 @@
import { useState } from 'react';
import type { BooleanLike } from 'tgui-core/react';
import {
Box,
Button,
DmIcon,
Flex,
ImageButton,
Input,
Section,
Stack,
DmIcon,
} from 'tgui-core/components';
import type { BooleanLike } from 'tgui-core/react';
import { useBackend } from '../backend';
import { Window } from '../layouts';
@@ -50,11 +49,13 @@ const AiStatusDisplayPickerContent = () => {
// Filter options based on search term
const filteredOptions = options.filter((option) =>
option.name.toLowerCase().includes(searchTerm.toLowerCase())
option.name.toLowerCase().includes(searchTerm.toLowerCase()),
);
// Separate original emotions and new AI core options
const originalOptions = filteredOptions.filter((option) => option.is_original);
const originalOptions = filteredOptions.filter(
(option) => option.is_original,
);
const newOptions = filteredOptions.filter((option) => !option.is_original);
return (
@@ -69,7 +70,7 @@ const AiStatusDisplayPickerContent = () => {
border: '2px solid #4a9eff',
borderRadius: '4px',
backgroundColor: '#1a1a1a',
padding: '8px'
padding: '8px',
}}
>
<DmIcon
@@ -106,9 +107,7 @@ const AiStatusDisplayPickerContent = () => {
{originalOptions.length > 0 && (
<Stack.Item>
<Section title="AI Emotions">
<OptionsList
options={originalOptions}
/>
<OptionsList options={originalOptions} />
</Section>
</Stack.Item>
)}
@@ -116,9 +115,7 @@ const AiStatusDisplayPickerContent = () => {
{newOptions.length > 0 && (
<Stack.Item>
<Section title="Additional Status Display Options">
<OptionsList
options={newOptions}
/>
<OptionsList options={newOptions} />
</Section>
</Stack.Item>
)}
@@ -132,17 +129,11 @@ const AiStatusDisplayPickerContent = () => {
)}
</Stack>
</Stack.Item>
</Stack>
);
};
const OptionsList = ({
options
}: {
options: StatusDisplayOption[];
}) => {
const OptionsList = ({ options }: { options: StatusDisplayOption[] }) => {
const { act } = useBackend<Data>();
return (
+4 -8
View File
@@ -120,9 +120,8 @@ const NewspaperChannel = (props) => {
<Box fontSize="12px">
Channel made by: {individual_channel.author_name}
</Box>
{channel_has_messages ? (
<>
{individual_channel.channel_messages.map((message) => (
{channel_has_messages
? individual_channel.channel_messages.map((message) => (
<>
<Box key={message.message}>
<Box
@@ -133,11 +132,8 @@ const NewspaperChannel = (props) => {
</Box>
<Divider />
</>
))}
</>
) : (
'No feed stories stem from this channel...'
)}
))
: 'No feed stories stem from this channel...'}
</Box>
))}
</Section>