fix: eslint warnings (#252)
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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']}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user