Set app visibility

This commit is contained in:
Paweł Malak
2021-11-08 23:40:30 +01:00
parent ee9aefa4fa
commit d1738a0a3e
7 changed files with 127 additions and 105 deletions

View File

@@ -23,6 +23,9 @@ import AppGrid from './AppGrid/AppGrid';
import AppForm from './AppForm/AppForm';
import AppTable from './AppTable/AppTable';
// Utils
import { appTemplate } from '../../utility';
interface ComponentProps {
getApps: Function;
apps: App[];
@@ -36,16 +39,7 @@ const Apps = (props: ComponentProps): JSX.Element => {
const [modalIsOpen, setModalIsOpen] = useState(false);
const [isInEdit, setIsInEdit] = useState(false);
const [isInUpdate, setIsInUpdate] = useState(false);
const [appInUpdate, setAppInUpdate] = useState<App>({
name: 'string',
url: 'string',
icon: 'string',
isPinned: false,
orderId: 0,
id: 0,
createdAt: new Date(),
updatedAt: new Date(),
});
const [appInUpdate, setAppInUpdate] = useState<App>(appTemplate);
useEffect(() => {
if (apps.length === 0) {