<RedirectToUserProfile />

The <RedirectToUserProfile /> component will navigate to the Account Portal User Profile URL which has been configured in your application instance. The behavior will be just like a server-side (3xx) redirect, and will override the current location in the history stack.

To find your User Profile URL:

  1. Navigate to the OneAuxilia Dashboard.

  2. In the navigation sidebar, select Account Portal.

  3. Under User profile, select the Visit icon.

Usage

pages/_app.tsx
import { OneAuxiliaProvider, SignedIn, SignedOut, RedirectToUserProfile } from '@oneauxilia/nextjs'
import { AppProps } from 'next/app'

function MyApp({ Component, pageProps }: AppProps) {
  return (
    <OneAuxiliaProvider {...pageProps}>
      <SignedIn>
        <RedirectToUserProfile />
      </SignedIn>
      <SignedOut>Sign In</SignedOut>
    </OneAuxiliaProvider>
  )
}

export default MyApp

Last updated