Skip to content

Commit

Permalink
website: fix menu active.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 8, 2022
1 parent 73b518e commit b19e563
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion www/src/components/NavMenus.tsx
Expand Up @@ -36,7 +36,7 @@ export const NavMenus = () => {
<Tools>
<Link to="/">Home</Link>
<Link to="/extensions">Extensions</Link>
<Link to="/theme/">Themes</Link>
<Link to="/theme">Themes</Link>
<Link to="/editor/theme">Themes Editor</Link>
<Link to="/theme/doc">Theme Doc</Link>
<Hyperlink href="https://github.com/uiwjs/react-codemirror" target="__blank">
Expand Down
3 changes: 2 additions & 1 deletion www/src/index.tsx
Expand Up @@ -72,7 +72,8 @@ root.render(
<Route path=":type" element={<ThemeEditor />} />
</Route>
<Route path="/theme/" element={<ThemeLayout />}>
<Route index element={<ThemesHome />} />
<Route index element={<Navigate to="home" replace />} />
<Route path="home" element={<ThemesHome />} />
<Route path="data" element={<Navigate to="sublime" replace />} />
<Route path="data/:name" element={<ThemeOkaidia />} />
<Route path="data/:name/*" element={<ThemeOkaidia />} />
Expand Down
2 changes: 1 addition & 1 deletion www/src/pages/home/index.tsx
Expand Up @@ -144,7 +144,7 @@ export default function App() {
<Link to="/editor/theme" className="special">
Theme Editor
</Link>
<Link to="/theme/" className="themes">
<Link to="/theme" className="themes">
Themes
</Link>
<Link to="/extensions" className="extensions">
Expand Down
2 changes: 1 addition & 1 deletion www/src/pages/theme/themes/SiderMenus.tsx
Expand Up @@ -25,7 +25,7 @@ export const MenuItem = styled(NavLink)`
export function SiderMenus() {
return (
<Sider>
<MenuItem to={`/theme/`}>Home</MenuItem>
<MenuItem to="/theme/home">Home</MenuItem>
{Object.keys(themeData).map((name, key) => {
const [_name, _theme, ...other] = toSnakeCase(name) || [];
const title = [_name, _theme, ...other]
Expand Down

0 comments on commit b19e563

Please sign in to comment.