fix: eslint warnings (#252)

This commit is contained in:
kimatata
2025-07-20 10:59:57 +09:00
committed by GitHub
parent e6be84b67e
commit 9ae67fd303
118 changed files with 423 additions and 511 deletions

View File

@@ -1,5 +1,4 @@
'use client';
import React from 'react';
import { useState, useEffect } from 'react';
import {
Button,
@@ -63,7 +62,7 @@ export default function ProjectDialog({ isOpen, editingProject, onCancel, onSubm
setIsProjectPublic(true);
}
}, [editingProject]);
}, [editingProject, projectDetail, projectName]);
const clear = () => {
setProjectName({

View File

@@ -19,7 +19,11 @@ export const ThemeSwitch: FC<ThemeSwitchProps> = ({ className, classNames }) =>
const isSSR = useIsSSR();
const onChange = () => {
theme === 'light' ? setTheme('dark') : setTheme('light');
if (theme === 'light') {
setTheme('dark');
} else {
setTheme('light');
}
};
const { Component, slots, isSelected, getBaseProps, getInputProps, getWrapperProps } = useSwitch({

View File

@@ -10,7 +10,7 @@ export default function PublicityChip({ context }: Props) {
return context.isSignedIn() ? (
<Avatar
size={16}
name={context.token!.user!.username}
name={context.token?.user?.username}
variant="beam"
colors={['#0A0310', '#49007E', '#FF005B', '#FF7D10', '#FFB238']}
/>