mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-04-10 12:59:05 +02:00
Change function expressions to statements
This commit is contained in:
parent
11d2c3036d
commit
88da62d346
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user