From 88da62d346534b0ce9a49f1d08ad113bda2d7a56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sodi=C4=87?= Date: Fri, 21 Feb 2025 21:25:47 +0100 Subject: [PATCH] Change function expressions to statements --- template/app/src/admin/dashboards/users/UsersTable.tsx | 8 ++++---- template/app/src/admin/elements/forms/SwitcherOne.tsx | 4 ++-- template/app/src/admin/elements/forms/SwitcherTwo.tsx | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/template/app/src/admin/dashboards/users/UsersTable.tsx b/template/app/src/admin/dashboards/users/UsersTable.tsx index c16ee1c..a88e8b3 100644 --- a/template/app/src/admin/dashboards/users/UsersTable.tsx +++ b/template/app/src/admin/dashboards/users/UsersTable.tsx @@ -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) => { +function AdminSwitch({ id, isAdmin }: Pick) { return ( updateIsUserAdminById({ id: id, isAdmin: value })} /> ); -}; +} -const UsersTable = () => { +function UsersTable() { const [skip, setskip] = useState(0); const [page, setPage] = useState(1); const [email, setEmail] = useState(undefined); @@ -238,6 +238,6 @@ const UsersTable = () => { ); -}; +} export default UsersTable; diff --git a/template/app/src/admin/elements/forms/SwitcherOne.tsx b/template/app/src/admin/elements/forms/SwitcherOne.tsx index ea2e2f7..d2e321d 100644 --- a/template/app/src/admin/elements/forms/SwitcherOne.tsx +++ b/template/app/src/admin/elements/forms/SwitcherOne.tsx @@ -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 ); -}; +} export default SwitcherOne; diff --git a/template/app/src/admin/elements/forms/SwitcherTwo.tsx b/template/app/src/admin/elements/forms/SwitcherTwo.tsx index 98c6669..52bd5e9 100644 --- a/template/app/src/admin/elements/forms/SwitcherTwo.tsx +++ b/template/app/src/admin/elements/forms/SwitcherTwo.tsx @@ -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 ); -}; +} const XIcon = () => { return (