@featurevisor/site 0.56.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -1
- package/CHANGELOG.md +11 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/lib/components/Tabs.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/App.tsx +4 -18
- package/src/components/ShowFeature.tsx +1 -0
- package/src/components/Tabs.tsx +2 -1
package/lib/components/Tabs.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/site",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "Static site for Featurevisor",
|
|
5
5
|
"main": "dist",
|
|
6
6
|
"scripts": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"webpack-merge": "^5.10.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@featurevisor/types": "^0.
|
|
66
|
+
"@featurevisor/types": "^0.57.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "62bd5cfb1b6f2f40747ad3abb3aa2562b3ec8aa7"
|
|
69
69
|
}
|
package/src/components/App.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { Routes, Route,
|
|
3
|
+
import { Routes, Route, Navigate } from "react-router-dom";
|
|
4
4
|
|
|
5
5
|
import { Header } from "./Header";
|
|
6
6
|
import { Footer } from "./Footer";
|
|
@@ -63,9 +63,6 @@ export function App() {
|
|
|
63
63
|
{fetchedSearchIndex && (
|
|
64
64
|
<SearchIndexContext.Provider value={{ isLoaded: true, data: fetchedSearchIndex }}>
|
|
65
65
|
<Routes>
|
|
66
|
-
{/* @TODO: try redirecting to /features */}
|
|
67
|
-
<Route path="/" element={<ListFeatures />} />
|
|
68
|
-
|
|
69
66
|
<Route path="features">
|
|
70
67
|
<Route index element={<ListFeatures />} />
|
|
71
68
|
|
|
@@ -75,23 +72,11 @@ export function App() {
|
|
|
75
72
|
<Route path="variables" element={<DisplayFeatureVariablesSchema />} />
|
|
76
73
|
<Route path="rules" element={<DisplayFeatureRules />}>
|
|
77
74
|
<Route path=":environmentKey" element={<DisplayFeatureRulesTable />} />
|
|
78
|
-
<Route
|
|
79
|
-
path="*"
|
|
80
|
-
loader={({ params }) =>
|
|
81
|
-
/* @TODO: fix redirection */
|
|
82
|
-
redirect(`/features/${params.featureKey}/rules/${environmentKeys[0]}`)
|
|
83
|
-
}
|
|
84
|
-
/>
|
|
75
|
+
<Route index element={<Navigate to={environmentKeys[0]} replace />} />
|
|
85
76
|
</Route>
|
|
86
77
|
<Route path="force" element={<DisplayFeatureForce />}>
|
|
87
78
|
<Route path=":environmentKey" element={<DisplayFeatureForceTable />} />
|
|
88
|
-
<Route
|
|
89
|
-
path="*"
|
|
90
|
-
loader={({ params }) =>
|
|
91
|
-
/* @TODO: fix redirection */
|
|
92
|
-
redirect(`/features/${params.featureKey}/force/${environmentKeys[0]}`)
|
|
93
|
-
}
|
|
94
|
-
/>
|
|
79
|
+
<Route index element={<Navigate to={environmentKeys[0]} replace />} />
|
|
95
80
|
</Route>
|
|
96
81
|
<Route path="history" element={<DisplayFeatureHistory />} />
|
|
97
82
|
</Route>
|
|
@@ -118,6 +103,7 @@ export function App() {
|
|
|
118
103
|
</Route>
|
|
119
104
|
|
|
120
105
|
<Route path="history" element={<ListHistory />} />
|
|
106
|
+
<Route index element={<Navigate to="features" replace />} />
|
|
121
107
|
</Routes>
|
|
122
108
|
</SearchIndexContext.Provider>
|
|
123
109
|
)}
|
package/src/components/Tabs.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { NavLink } from "react-router-dom";
|
|
|
4
4
|
interface Tab {
|
|
5
5
|
title: string;
|
|
6
6
|
to: string;
|
|
7
|
+
end?: boolean;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
interface TabsProps {
|
|
@@ -20,7 +21,7 @@ export function Tabs(props: TabsProps) {
|
|
|
20
21
|
<NavLink
|
|
21
22
|
key={tab.title}
|
|
22
23
|
to={tab.to}
|
|
23
|
-
end
|
|
24
|
+
end={Boolean(tab.end)}
|
|
24
25
|
className={({ isActive }) =>
|
|
25
26
|
[
|
|
26
27
|
"w-1/4",
|