change(ui): projects revamp - gdpr

This commit is contained in:
Shekar Siri 2025-01-07 16:26:25 +01:00
parent 1e7948bcf7
commit fb7c7b38a9
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useMemo, useState } from 'react';
import { Button, Space, Switch, Tooltip, Input, Typography } from 'antd';
import { Icon, Loader } from 'UI';
import cn from 'classnames';

View file

@ -20,14 +20,14 @@ inputModeOptions.forEach((o, i) => inputModeOptionsMap[o.value] = i)
const ProjectCodeSnippet = props => {
const { projectsStore } = useStore();
const site = props.site;
const gdpr = projectsStore.instance.gdpr;
const gdpr = site.gdpr;
const saveGdpr = projectsStore.saveGDPR;
const editGdpr = projectsStore.editGDPR;
const [changed, setChanged] = useState(false)
const saveGDPR = () => {
setChanged(true)
saveGdpr(site.id);
void saveGdpr(site.id);
}
const onChangeSelect = ({ name, value }) => {
@ -39,7 +39,7 @@ const ProjectCodeSnippet = props => {
editGdpr({ [ name ]: checked });
saveGDPR()
}
return (
<div>
<div className="mb-4">