Skip to content

Commit

Permalink
fix(generator): fix generated uapp
Browse files Browse the repository at this point in the history
ref: MANAGER-11571

Signed-off-by: Nicolas Pierre-charles <nicolas.pierre-charles.ext@corp.ovh.com>
  • Loading branch information
Nicolas Pierre-charles committed May 10, 2024
1 parent 23b4da9 commit b988655
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ export default function DashboardPage() {
<OsdsTabs panel={panel}>
<OsdsTabBar slot="top">
{tabsList.map((tab: DashboardTabItemProps) => (
<OsdsTabBarItem
key={`osds-tab-bar-item-${tab.name}`}
panel={tab.name}
>
<NavLink to={tab.to} className="no-underline">
{tab.title}
</NavLink>
</OsdsTabBarItem>
<NavLink to={tab.to} className="no-underline">
<OsdsTabBarItem
key={`osds-tab-bar-item-${tab.name}`}
panel={tab.name}
>
{tab.title}
</OsdsTabBarItem>
</NavLink>
))}
</OsdsTabBar>
</OsdsTabs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { useParams } from 'react-router-dom';
import { useProject } from '@/data/hooks/pci/useProject';
{{/if}}
import appConfig from '@/{{appName}}.config';
import ConfigInterface from '@/types/config.interface';

export interface BreadcrumbProps {
customRootLabel?: string;
Expand All @@ -22,8 +21,7 @@ export interface BreadcrumbProps {
}

function Breadcrumb({ customRootLabel }: BreadcrumbProps): JSX.Element {
const myConfig: ConfigInterface = appConfig;
const label = customRootLabel || myConfig.rootLabel;
const label = customRootLabel || appConfig.rootLabel;

{{#if isPCI}}
const { projectId } = useParams();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { RouteObject } from 'react-router-dom';
import NotFound from './pages/404';
import { PageType } from '@ovh-ux/manager-react-shell-client';
import NotFound from '@/pages/404';
import { urls } from '@/routes/routes.constant';

const lazyRouteConfig = (importFn: CallableFunction): Partial<RouteObject> => {
return {
Expand Down Expand Up @@ -39,7 +40,7 @@ export const Routes: any = [
{
id: 'dashboard',
path: '',
...lazyRouteConfig(() => import('@/pages/dashboard/index')),
...lazyRouteConfig(() => import('@/pages/dashboard/general-informations')),
handle: {
tracking: {
pageName: 'dashboard',
Expand All @@ -50,7 +51,7 @@ export const Routes: any = [
{
id: 'tab2',
path: 'Tab2',
...lazyRouteConfig(() => import('@/pages/dashboard/Tab2')),
...lazyRouteConfig(() => import('@/pages/dashboard/tab2')),
handle: {
tracking: {
pageName: 'tab2',
Expand Down

0 comments on commit b988655

Please sign in to comment.