Skip to content

Commit b1a1ae0

Browse files
authored
Improve app-portal page (#229)
2 parents ba54f41 + 9087094 commit b1a1ae0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/app-portal.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For more information on how to use the app portal please refer to the [receiving
2323
App portal access is based on short-lived sessions using special magic links. You customers don't need a Svix account, and they don't even need to know that Svix exists.
2424
:::
2525

26-
To give your users access to the [App Portal](./app-portal), just use the [app portal access endpoint](https://api.svix.com/docs#tag/Authentication/operation/v1.authentication.app-portal-access). Calling this endpoint with an `app_id` returns a single-use URL you can just redirect your users to in order to log them into the App Portal. They will stay logged in for a few days or until they log out.
26+
To give your users access to the App Portal, just use the [app portal access endpoint](https://api.svix.com/docs#tag/Authentication/operation/v1.authentication.app-portal-access). Calling this endpoint with an `app_id` returns a single-use URL you can just redirect your users to in order to log them into the App Portal. They will stay logged in for a few days or until they log out.
2727

2828
<CodeTabs>
2929
<TabItem value="js">
@@ -199,7 +199,7 @@ import "svix-react/style.css";
199199

200200
const SvixEmbed = () => {
201201
const [appPortal, setAppPortal] = React.useState(null);
202-
202+
203203
React.useEffect(() => {
204204
// Prerequisite: You'll need an endpoint that returns the App Portal
205205
// magic URL (https://api.svix.com/docs#tag/Authentication/operation/v1.authentication.app-portal-access)
@@ -259,9 +259,12 @@ http://app.svix.com/login?primaryColorLight=22cc91&primaryColorDark=28bb93&darkM
259259
```
260260

261261
## Implementing your own Consumer App Portal functionality
262-
You can implement Consumer App Portal functionality into your own dashboard using ergonomic React Hooks provided by the `svix-react` library. This approach allows you to use your own UI structure and components. The hooks are an abstraction over the `svix` JavaScript library and help to handle concerns like paginating over large lists of data, and reloading data.
262+
You can implement Consumer App Portal functionality into your own dashboard using ergonomic React Hooks provided by the [`svix-react`] library.
263+
This approach allows you to use your own UI structure and components.
264+
The hooks are an abstraction over the `svix` JavaScript library and help to handle concerns like paginating over large lists of data, and reloading data.
265+
266+
Using the hooks requires wrapping your application or components in `<SvixProvider>`:
263267

264-
Using the hooks requires wrapping your application or components in `<SvixProvider />`:
265268
```jsx
266269
import { SvixProvider } from 'svix-react'
267270
@@ -274,7 +277,7 @@ export default function App() {
274277
}
275278
```
276279

277-
Then, you can use hooks like `useMessages`:
280+
Then, you can use hooks like `useEndpoints`:
278281

279282
```jsx
280283
import { useEndpoints } from 'svix-react'
@@ -302,7 +305,7 @@ export default function ListEndpoints() {
302305
}
303306
```
304307

305-
To get started and see a full list of hooks, refer to the [`svix-react` NPM package](https://www.npmjs.com/package/svix-react).
308+
[`svix-react`]: https://www.npmjs.com/package/svix-react
306309

307310
## Read Only Consumer App Portals
308311
You can set all Consumer App Portals belonging to an environment to be read only by enabling the Read Only toggle on the Environment Settings page.

0 commit comments

Comments
 (0)