Skip to content

Commit

Permalink
docs: Describe basename prop in UI documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Harri Lehtola <[email protected]>
  • Loading branch information
peruukki committed Feb 4, 2025
1 parent 34d2bb0 commit cf64b8d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion docs/reference/alpha-web-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ You can use `projectListPromise` to provide a promise that overrides where the F

You can add custom tabs for any of the core Feast objects through the `tabsRegistry`.

```
```jsx
const tabsRegistry = {
RegularFeatureViewCustomTabs: [
{
Expand All @@ -141,3 +141,23 @@ const tabsRegistry = {
```

Examples of custom tabs can be found in the `ui/custom-tabs` folder.

**Custom basename**

If you want to serve the UI under a specific URL path instead of at the root,
you can use the `basename` prop, and it will be forwarded to React Router.

For example, to serve the UI at the `/feast-ui` path:

```jsx
<FeastUI
basename="/feast-ui"
feastUIConfigs={{
projectListPromise: fetch("/feast-ui/projects-list.json", {
headers: {
"Content-Type": "application/json",
},
}).then((res) => res.json())
}}
/>
```

0 comments on commit cf64b8d

Please sign in to comment.