Merge pull request #1939 from gnosis/feature/#1682-custom-app
Link to docs from "Add custom app"
This commit is contained in:
commit
3f413cf86c
|
@ -28,7 +28,7 @@ export const useSafeScheduledUpdates = (safeLoaded: boolean, safeAddress?: strin
|
||||||
})
|
})
|
||||||
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
timer.current = setTimeout(() => {
|
timer.current = window.setTimeout(() => {
|
||||||
fetchSafeData(address)
|
fetchSafeData(address)
|
||||||
}, TIMEOUT * 3)
|
}, TIMEOUT * 3)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import styled from 'styled-components'
|
||||||
import { SafeApp } from 'src/routes/safe/components/Apps/types.d'
|
import { SafeApp } from 'src/routes/safe/components/Apps/types.d'
|
||||||
import GnoForm from 'src/components/forms/GnoForm'
|
import GnoForm from 'src/components/forms/GnoForm'
|
||||||
import Img from 'src/components/layout/Img'
|
import Img from 'src/components/layout/Img'
|
||||||
|
import { Icon, Link, Text } from '@gnosis.pm/safe-react-components'
|
||||||
|
|
||||||
import AppAgreement from './AppAgreement'
|
import AppAgreement from './AppAgreement'
|
||||||
import AppUrl, { AppInfoUpdater, appUrlResolver } from './AppUrl'
|
import AppUrl, { AppInfoUpdater, appUrlResolver } from './AppUrl'
|
||||||
|
@ -29,6 +30,16 @@ const AppInfo = styled.div`
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
const AppDocsInfo = styled.div`
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
flex-direction: column;
|
||||||
|
svg {
|
||||||
|
position: relative;
|
||||||
|
top: 4px;
|
||||||
|
left: 4px;
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
export interface AddAppFormValues {
|
export interface AddAppFormValues {
|
||||||
appUrl: string
|
appUrl: string
|
||||||
|
@ -66,6 +77,22 @@ const AddApp = ({ appList, closeModal }: AddAppProps): ReactElement => {
|
||||||
<GnoForm decorators={[appUrlResolver]} initialValues={INITIAL_VALUES} onSubmit={handleSubmit} testId={FORM_ID}>
|
<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} />
|
<AppUrl appList={appList} />
|
||||||
|
|
||||||
{/* Fetch app from url and return a SafeApp */}
|
{/* Fetch app from url and return a SafeApp */}
|
||||||
|
|
|
@ -119,7 +119,7 @@ const AppFrame = ({ appUrl }: Props): React.ReactElement => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (appIsLoading) {
|
if (appIsLoading) {
|
||||||
timer.current = setTimeout(() => {
|
timer.current = window.setTimeout(() => {
|
||||||
setAppTimeout(true)
|
setAppTimeout(true)
|
||||||
}, TIMEOUT)
|
}, TIMEOUT)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue