Revamp Google Cal warning for Meet, Amie, and Vimcal (#7308)

* Create requires Google Cal component

* Create installed GCal message

* Move requires GCal component to App

* Clean up

* Abstract prerequisite component

* Add requires message on app card

* Refactor to dependency

* Clean up

* Change typeform dep & remove app card dep component

* Clean up

* Change dependency to dependencies

* Pass disableInstall to default install button for AppCard

* Refactor app page to dependencies

* Type fix

* More type fixes

* Update apps/web/components/apps/App.tsx

* Apply suggestions from code review

---------

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-03-09 10:07:23 +01:00
1 parent c32aadf297
commit 58b439ca65
18 files changed
+240 -121

No files matched your search

+3
View File
@@ -88,6 +88,7 @@ export function AppCard({ app, credentials, searchText }: AppCardProps) {
<InstallAppButton
type={app.type}
isProOnly={app.isProOnly}
disableInstall={!!app.dependencies && !app.dependencyData?.some((data) => !data.installed)}
wrapperClassName="[@media(max-width:260px)]:w-full"
render={({ useDefaultComponent, ...props }) => {
if (useDefaultComponent) {
@@ -116,6 +117,7 @@ export function AppCard({ app, credentials, searchText }: AppCardProps) {
type={app.type}
isProOnly={app.isProOnly}
wrapperClassName="[@media(max-width:260px)]:w-full"
disableInstall={!!app.dependencies && app.dependencyData?.some((data) => !data.installed)}
render={({ useDefaultComponent, ...props }) => {
if (useDefaultComponent) {
props = {
@@ -123,6 +125,7 @@ export function AppCard({ app, credentials, searchText }: AppCardProps) {
onClick: () => {
mutation.mutate({ type: app.type, variant: app.variant, slug: app.slug });
},
disabled: !!props.disabled,
};
}
return (