fix linter

This commit is contained in:
Simon
2025-01-07 09:48:45 +07:00
parent 8ca943ca7b
commit 09ef342de7
18 changed files with 42 additions and 34 deletions

View File

@@ -12,7 +12,7 @@ import PaginationDummy from '../components/PaginationDummy';
import FormattedNumber from '../components/FormattedNumber';
import Button from '../components/Button';
import updateChannelOverwrites from '../api/actions/updateChannelOverwrite';
import loadIsAdmin from '../functions/getIsAdmin';
import useIsAdmin from '../functions/useIsAdmin';
export type ChannelBaseOutletContextType = {
currentPage: number;
@@ -34,7 +34,7 @@ const ChannelAbout = () => {
const { channelId } = useParams() as ChannelAboutParams;
const { setStartNotification } = useOutletContext() as ChannelBaseOutletContextType;
const navigate = useNavigate();
const isAdmin = loadIsAdmin();
const isAdmin = useIsAdmin();
const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);
const [descriptionExpanded, setDescriptionExpanded] = useState(false);
@@ -76,7 +76,10 @@ const ChannelAbout = () => {
})();
}, [refresh, channelId]);
const handleUpdateConfig = async (configKey: string, configValue: any) => {
const handleUpdateConfig = async (
configKey: string,
configValue: string | boolean | number | null,
) => {
if (!channel) return;
await updateChannelOverwrites(channel.channel_id, configKey, configValue);
setRefresh(true);