Skip to content

@activitypods/refine-antd

Ant Design components above the hooks of @activitypods/refine-hooks. They require antd 5, @ant-design/icons 5 and @refinedev/core 5.

LoginPage

Handle every step of the login. It must be mounted on the redirectUri route of the auth provider, outside of the authenticated routes. See the auth provider page.

<Route path="/login" element={<LoginPage />} />

Props

PropTypeDefaultDescription
defaultPodProviderStringOffer only this Pod provider
customPodProvidersArrayThe Pod providers to offer, as { 'apods:baseUrl': string, 'apods:area'?: string } objects
redirectString/Where to go once logged in
textStringText shown above the Pod providers

The page handles the search params of useLoginFlow.

BackgroundChecks

Check the app status while the user is logged in, and wrap the authenticated part of the app. See the auth provider page.

<BackgroundChecks listeningTo={[inboxUri, outboxUri]}>{children}</BackgroundChecks>

Its children are displayed if the user is logged out, or once a check has succeeded. Before that, a loader is displayed. If there is an error, it is displayed with a button to check again and a button to log out.

When you use this component, pass appStatusCheckInterval: false to the auth provider.

Props

PropTypeDefaultDescription
listeningToArray[]URIs on which the app backend must have a webhook channel
checkIntervalNumber | false120000Interval in ms between checks. With false, there is no periodic check

Translations

The components translate their texts with the i18nProvider given to Refine, using these keys and default texts. They also display the texts of the hooks.

KeyDefault text
pages.login.choosePodProviderChoose the Pod provider that hosts your ActivityPods account
pages.login.backToLoginBack to login
buttons.refreshRefresh
buttons.logoutLogout