diff --git a/packages/marketplace/src/components/pages/client-app-detail/client-app-detail.tsx b/packages/marketplace/src/components/pages/client-app-detail/client-app-detail.tsx
index f8d98468a4..9f99b43ee4 100644
--- a/packages/marketplace/src/components/pages/client-app-detail/client-app-detail.tsx
+++ b/packages/marketplace/src/components/pages/client-app-detail/client-app-detail.tsx
@@ -34,33 +34,10 @@ export const mapState = (useSelector): MapState => {
}
}
-export const onInstallAppButtonClick = () => {
- return () => {}
-}
-
-export const renderAppHeaderButtonGroup = (path: string, installedOn?: string) => {
- switch (path) {
- case Routes.CLIENT_APP_DETAIL:
- return installedOn ? (
-
-
- Installed
-
- ) : (
-
- )
- default:
- break
- }
-}
-
const ClientAppDetail: React.FC = () => {
const match = useRouteMatch()
const { path } = match
const { appDetailData, isLoadingAppDetail, loginType } = mapState(useSelector)
- const { installedOn } = appDetailData
if (!appDetailData.id || isLoadingAppDetail) {
return
diff --git a/packages/marketplace/src/components/ui/client-app-detail/client-app-detail-button-group.tsx b/packages/marketplace/src/components/ui/client-app-detail/client-app-detail-button-group.tsx
index b7ae0e7546..48e9d03adc 100644
--- a/packages/marketplace/src/components/ui/client-app-detail/client-app-detail-button-group.tsx
+++ b/packages/marketplace/src/components/ui/client-app-detail/client-app-detail-button-group.tsx
@@ -3,7 +3,7 @@ import { FaCheck } from 'react-icons/fa'
import { AppDetailModel } from '@reapit/foundations-ts-definitions'
import styles from '@/styles/pages/developer-app-detail.scss?mod'
import { Button } from '@reapit/elements'
-import ClientAppInstallationConfirmation from './client-app-installation-confirmation'
+import ClientAppInstallConfirmation from './client-app-install-confirmation'
export type ClientAppDetailButtonGroupProps = {
appDetailData: AppDetailModel & {
@@ -43,7 +43,7 @@ const ClientAppDetailButtonGroup: React.FC = ({
Install App
)}
- void
@@ -22,7 +22,7 @@ export const onInstallButtonClick = (appId: string, dispatch: Dispatch) =>
}
}
-const ClientAppInstallationConfirmation: React.FC = ({
+const ClientAppInstallConfirmation: React.FC = ({
appDetailData,
visible,
closeInstallConfirmationModal,
@@ -84,4 +84,4 @@ const ClientAppInstallationConfirmation: React.FC void
+}
+
+export const onInstallButtonClick = (appId: string, dispatch: Dispatch) => {
+ return () => {
+ dispatch(
+ appInstallationsRequestUninstall({
+ appId,
+ }),
+ )
+ }
+}
+
+const ClientAppUninstallConfirmation: React.FC = ({
+ appDetailData,
+ visible,
+ closeInstallConfirmationModal,
+}) => {
+ const { name, id = '', scopes = [] } = appDetailData || {}
+ const dispatch = useDispatch()
+
+ return (
+
+
+
+ >
+ }
+ >
+ <>Are you sure you wish to uninstall {name}? This action will uninstall the app for ALL platform users>
+
+ )
+}
+
+export default ClientAppUninstallConfirmation