CondoWebAppRedirect

This method allows you to seamlessly redirect the user to another section of the application without completely reloading the page.

Platforms

  • B2B-Web

Method params

Parameter nameParameter typeRequiredParameter description
urlstringyesUrl to redirect to
target_self | _blankyesRedirect target

Return value

If successful, the method will return a JSON object containing a single success field:
json
{ "success": true }

Usage example

typescript
// pages/success.tsx import React, { useCallback } from 'react' import bridge from '@open-condo/bridge' import { Typography, Space, Button } from '@open-condo/ui' export default function SuccessPage (): React.ReactNode { const onClick = useCallback(() => { bridge.send('CondoWebAppRedirect', { url: 'https://condo.d.doma.ai/ticket', target: '_self' }) }, []) return ( <Space size={16} direction='vertical'> <Typography.Paragraph type='secondary'> Congratulations, the configuration of the mini-application is complete. Tickets from the bot will now automatically appear in the system. </Typography.Paragraph> <Button type='primary' onClick={onClick}>To tickets</Button> </Space> ) }