remove callback works now haha lol
This commit is contained in:
parent
ecc2f4d851
commit
988ab1c683
3 changed files with 5 additions and 13 deletions
|
|
@ -47,11 +47,12 @@ interface Props {
|
|||
devices: Device[];
|
||||
permissions: pond.Permission[];
|
||||
refreshCallback: () => void;
|
||||
removeCallback?: () => void;
|
||||
}
|
||||
|
||||
export default function GroupActions(props: Props) {
|
||||
const classes = useStyles();
|
||||
const { group, permissions, refreshCallback, devices } = props;
|
||||
const { group, permissions, refreshCallback, devices, removeCallback } = props;
|
||||
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
||||
const [groupSettingsOpen, setGroupSettingsOpen] = useState(false);
|
||||
const [shareOpen, setShareOpen] = useState(false);
|
||||
|
|
@ -142,6 +143,7 @@ export default function GroupActions(props: Props) {
|
|||
isDialogOpen={groupSettingsOpen}
|
||||
refreshCallback={refreshCallback}
|
||||
closeDialogCallback={() => setGroupSettingsOpen(false)}
|
||||
removeGroupCallback={removeCallback}
|
||||
groupDevices={devices}
|
||||
/>
|
||||
<ShareObject
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default function GroupSettings(props: Props) {
|
|||
// Update ref when prop changes
|
||||
useEffect(() => {
|
||||
console.log("Updating removeCallbackRef with:", removeGroupCallback);
|
||||
removeCallbackRef.current = removeGroupCallback;
|
||||
if (removeGroupCallback) removeCallbackRef.current = removeGroupCallback;
|
||||
}, [removeGroupCallback]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue