change(ui): projects revamp - gdpr
This commit is contained in:
parent
1e7948bcf7
commit
fb7c7b38a9
2 changed files with 4 additions and 4 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue