-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathindex.tsx
More file actions
99 lines (95 loc) · 2.89 KB
/
index.tsx
File metadata and controls
99 lines (95 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import React from "react";
import { createRoot } from "react-dom/client";
import { QueryClient } from "react-query";
import FeastUI from "./FeastUI";
// How to add a Custom Tab
// 1. Pick which object type you want your tab
// to be in. e.g. Feature View, Feature Service, etc.
//
// 2. Write a regular React Component for Tab Content.
// It will be passed props with data about the Feast FCO
// e.g. RegularFeatureViewCustomTabProps, FeatureServiceCustomTabProps
// See: types.ts in this folder
//
// 3. Register the tab in the appropriate array below. Each entry
// is a record with three keys: label, path, and Component.
// Import your component and pass it as Component
import DataTab from "./custom-tabs/data-tab/DataTab";
import RFVDemoCustomTab from "./custom-tabs/reguar-fv-demo-tab/DemoCustomTab";
import ODFVDemoCustomTab from "./custom-tabs/ondemand-fv-demo-tab/DemoCustomTab";
import SFVDemoCustomTab from "./custom-tabs/stream-fv-demo-tab/DemoCustomTab";
import FSDemoCustomTab from "./custom-tabs/feature-service-demo-tab/DemoCustomTab";
import DSDemoCustomTab from "./custom-tabs/data-source-demo-tab/DemoCustomTab";
import EntDemoCustomTab from "./custom-tabs/entity-demo-tab/DemoCustomTab";
import DatasetDemoCustomTab from "./custom-tabs/dataset-demo-tab/DemoCustomTab";
import FDemoCustomTab from "./custom-tabs/feature-demo-tab/DemoCustomTab";
const queryClient = new QueryClient();
const tabsRegistry = {
RegularFeatureViewCustomTabs: [
{
label: "Custom Tab Demo", // Navigation Label for the tab
path: "demo-tab", // Subpath for the tab
Component: RFVDemoCustomTab,
},
{
label: "Data Tab Demo", // Navigation Label for the tab
path: "data-tab", // Subpath for the tab
Component: DataTab,
},
],
OnDemandFeatureViewCustomTabs: [
{
label: "Custom Tab Demo",
path: "demo-tab",
Component: ODFVDemoCustomTab,
},
],
StreamFeatureViewCustomTabs: [
{
label: "Custom Tab Demo",
path: "demo-tab",
Component: SFVDemoCustomTab,
},
],
FeatureServiceCustomTabs: [
{
label: "Custom Tab Demo",
path: "fs-demo-tab",
Component: FSDemoCustomTab,
},
],
DataSourceCustomTabs: [
{
label: "Custom Tab Demo",
path: "fs-demo-tab",
Component: DSDemoCustomTab,
},
],
EntityCustomTabs: [
{
label: "Custom Tab Demo",
path: "demo-tab",
Component: EntDemoCustomTab,
},
],
DatasetCustomTabs: [
{
label: "Custom Tab Demo",
path: "demo-tab",
Component: DatasetDemoCustomTab,
},
],
FeatureCustomTabs: [
{
label: "Custom Tab Demo",
path: "demo-tab",
Component: FDemoCustomTab,
},
],
};
const root = createRoot(document.getElementById("root")!);
root.render(
<React.StrictMode>
<FeastUI reactQueryClient={queryClient} feastUIConfigs={{ tabsRegistry }} />
</React.StrictMode>,
);