change function of fliter sort, modal and locate set new data and change it and update
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import { FormControlLabel, Switch } from "@mui/material";
|
||||
|
||||
function SwitchContent({ data, changeData }) {
|
||||
function SwitchContent({ filter, updateData }) {
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-[12px]">
|
||||
<FormControlLabel
|
||||
control={
|
||||
<Switch
|
||||
checked={data.turn}
|
||||
checked={filter.active}
|
||||
onChange={(event) =>
|
||||
changeData(event.target.checked ? 1 : 0, "turn", false, "turn")
|
||||
updateData("active", event.target.checked ? 1 : 0)
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user