Skip to content

Commit

Permalink
website: update router link. #409
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 4, 2023
1 parent d0c11ab commit f8f65af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions www/src/pages/theme/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ export function ThemesHome() {
<Warpper>
<ThemesWarpper>
{Object.keys(themeData).map((name, idx) => {
const [_name, _theme] = toSnakeCase(name) || [];
const linkName = (toSnakeCase(name) || []).join('/');
return (
<Link key={idx} to={`/theme/data/${_name}${_theme ? `/${_theme}` : ''}`}>
<Link key={idx} to={`/theme/data/${linkName}`}>
<ThemeCard>
<Title>{toTitleCase(name)}</Title>
<CodeEditor
Expand Down
3 changes: 2 additions & 1 deletion www/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,12 @@ export const routes: MenuRouteObject[] = [
),
},
{
path: 'data/vscode',
path: 'data/vscode/dark',
label: 'VS Code',
element: (
<Preview
themePkg="@uiw/codemirror-theme-vscode"
mode="dark"
path={() => import('@uiw/codemirror-theme-vscode/README.md')}
/>
),
Expand Down

0 comments on commit f8f65af

Please sign in to comment.