Added link to docs for custom app modal

This commit is contained in:
Mati Dastugue 2021-02-22 12:09:13 -03:00
parent 5a0dc46614
commit ccc6939ef4
4 changed files with 2397 additions and 1633 deletions

View File

@ -28,7 +28,7 @@ export const useSafeScheduledUpdates = (safeLoaded: boolean, safeAddress?: strin
})
if (mounted) {
timer.current = setTimeout(() => {
timer.current = window.setTimeout(() => {
fetchSafeData(address)
}, TIMEOUT * 3)
}

View File

@ -5,6 +5,7 @@ import styled from 'styled-components'
import { SafeApp } from 'src/routes/safe/components/Apps/types.d'
import GnoForm from 'src/components/forms/GnoForm'
import Img from 'src/components/layout/Img'
import { Icon, Link, Text } from '@gnosis.pm/safe-react-components'
import AppAgreement from './AppAgreement'
import AppUrl, { AppInfoUpdater, appUrlResolver } from './AppUrl'
@ -29,6 +30,13 @@ const AppInfo = styled.div`
margin-right: 10px;
}
`
const AppDocsInfo = styled.div`
display: flex;
margin-bottom: 10px;
a {
margin-left: 5px;
}
`
export interface AddAppFormValues {
appUrl: string
@ -66,6 +74,22 @@ const AddApp = ({ appList, closeModal }: AddAppProps): ReactElement => {
<GnoForm decorators={[appUrlResolver]} initialValues={INITIAL_VALUES} onSubmit={handleSubmit} testId={FORM_ID}>
{() => (
<>
<AppDocsInfo>
<Text size="xl" as="span" color="secondary">
Safe Apps are third-party extensions.
</Text>
<Link
href="https://docs.gnosis.io/safe/docs/sdks_safe_apps/"
target="_blank"
rel="noreferrer"
title="Learn more about building Safe Apps"
>
<Text size="xl" as="span" color="primary">
Learn more about building Safe Apps
</Text>
<Icon size="sm" type="externalLink" color="primary" />
</Link>
</AppDocsInfo>
<AppUrl appList={appList} />
{/* Fetch app from url and return a SafeApp */}

View File

@ -119,7 +119,7 @@ const AppFrame = ({ appUrl }: Props): React.ReactElement => {
useEffect(() => {
if (appIsLoading) {
timer.current = setTimeout(() => {
timer.current = window.setTimeout(() => {
setAppTimeout(true)
}, TIMEOUT)
} else {

4002
yarn.lock

File diff suppressed because it is too large Load Diff