Change function expressions to statements

This commit is contained in:
Filip Sodić 2025-02-21 21:25:47 +01:00
parent 11d2c3036d
commit 88da62d346
3 changed files with 8 additions and 8 deletions

View File

@ -7,13 +7,13 @@ import DropdownEditDelete from './DropdownEditDelete';
import { updateIsUserAdminById } from 'wasp/client/operations';
import { type User } from 'wasp/entities';
const AdminSwitch = ({ id, isAdmin }: Pick<User, 'id' | 'isAdmin'>) => {
function AdminSwitch({ id, isAdmin }: Pick<User, 'id' | 'isAdmin'>) {
return (
<SwitcherOne isOn={isAdmin} onChange={(value) => updateIsUserAdminById({ id: id, isAdmin: value })} />
);
};
}
const UsersTable = () => {
function UsersTable() {
const [skip, setskip] = useState(0);
const [page, setPage] = useState(1);
const [email, setEmail] = useState<string | undefined>(undefined);
@ -238,6 +238,6 @@ const UsersTable = () => {
</div>
</div>
);
};
}
export default UsersTable;

View File

@ -1,7 +1,7 @@
import { useId } from 'react';
import { cn } from '../../../client/cn';
const SwitcherOne = ({ isOn, onChange }: { isOn: boolean; onChange: (value: boolean) => void }) => {
function SwitcherOne({ isOn, onChange }: { isOn: boolean; onChange: (value: boolean) => void }) {
const id = useId();
return (
@ -19,6 +19,6 @@ const SwitcherOne = ({ isOn, onChange }: { isOn: boolean; onChange: (value: bool
</label>
</div>
);
};
}
export default SwitcherOne;

View File

@ -1,7 +1,7 @@
import { useId } from 'react';
import { cn } from '../../../client/cn';
const SwitcherTwo = ({ isOn, onChange }: { isOn: boolean; onChange: (value: boolean) => void }) => {
function SwitcherTwo({ isOn, onChange }: { isOn: boolean; onChange: (value: boolean) => void }) {
const id = useId();
return (
@ -29,7 +29,7 @@ const SwitcherTwo = ({ isOn, onChange }: { isOn: boolean; onChange: (value: bool
</label>
</div>
);
};
}
const XIcon = () => {
return (