From fef455074a1f3a1d03798844e1a188201eb6abe6 Mon Sep 17 00:00:00 2001 From: Maarten de Waard <maarten@greenhost.nl> Date: Wed, 5 Oct 2022 11:47:53 +0200 Subject: [PATCH] comment out app installation/configuration button --- src/modules/apps/Apps.tsx | 67 +++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/src/modules/apps/Apps.tsx b/src/modules/apps/Apps.tsx index 1e923fb1..d6e7f507 100644 --- a/src/modules/apps/Apps.tsx +++ b/src/modules/apps/Apps.tsx @@ -75,37 +75,42 @@ export const Apps: React.FC = () => { }, width: 'auto', }, - { - Header: ' ', - Cell: (e: any) => { - const navigate = useNavigate(); - const appStatus = e.cell.row.original.status as AppStatusEnum; - if (appStatus === AppStatusEnum.Installing) { - return null; - } - const { slug } = e.cell.row.original; - let buttonFuntion = () => navigate(`/apps/${slug}`); - if (appStatus === AppStatusEnum.NotInstalled) { - buttonFuntion = () => { - setAppSlug(slug); - setInstallModalOpen(true); - }; - } - return ( - <div className="text-right opacity-0 group-hover:opacity-100 transition-opacity"> - <button - onClick={buttonFuntion} - type="button" - className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" - > - {getConstForStatus(appStatus, 'buttonIcon')} - {getConstForStatus(appStatus, 'buttonTitle')} - </button> - </div> - ); - }, - width: 'auto', - }, + // Uncomment this to have an "Install" or "Configure" button for + // applications. + // + // We need to implement installation and configuration in the back-end to be + // able to use those buttons. + // { + // Header: ' ', + // Cell: (e: any) => { + // const navigate = useNavigate(); + // const appStatus = e.cell.row.original.status as AppStatusEnum; + // if (appStatus === AppStatusEnum.Installing) { + // return null; + // } + // const { slug } = e.cell.row.original; + // let buttonFuntion = () => navigate(`/apps/${slug}`); + // if (appStatus === AppStatusEnum.NotInstalled) { + // buttonFuntion = () => { + // setAppSlug(slug); + // setInstallModalOpen(true); + // }; + // } + // return ( + // <div className="text-right opacity-0 group-hover:opacity-100 transition-opacity"> + // <button + // onClick={buttonFuntion} + // type="button" + // className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" + // > + // {getConstForStatus(appStatus, 'buttonIcon')} + // {getConstForStatus(appStatus, 'buttonTitle')} + // </button> + // </div> + // ); + // }, + // width: 'auto', + // }, ]; return ( -- GitLab