Skip to content

Commit

Permalink
Remove learning resources
Browse files Browse the repository at this point in the history
The @patternfly/quickstarts extension doesn't work with next.js in production. Temporarly disable the page.
  • Loading branch information
riccardo-forina committed Jan 10, 2024
1 parent 6dcac58 commit 6ac375d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions ui/app/[locale]/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export function AppLayout({ children }: PropsWithChildren) {
<Clusters />
</Suspense>
</NavExpandable>
<NavItemLink url={"/learning-resources"}>
Learning resources
</NavItemLink>
{/*<NavItemLink url={"/learning-resources"}>*/}
{/* Learning resources*/}
{/*</NavItemLink>*/}
</NavList>
</Nav>
</AppSidebar>
Expand Down
13 changes: 6 additions & 7 deletions ui/app/[locale]/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
Tooltip,
} from "@/libs/patternfly/react-core";
import { HelpIcon } from "@/libs/patternfly/react-icons";
import { Link } from "@/navigation";
import { Suspense } from "react";
import styles from "./home.module.css";

Expand Down Expand Up @@ -121,9 +120,9 @@ export default function Home() {
<b>Recommended learning resources</b>
</TextContent>
</LevelItem>
<LevelItem>
<Link href={"/learning-resources"}>View all</Link>
</LevelItem>
{/*<LevelItem>*/}
{/* <Link href={"/learning-resources"}>View all</Link>*/}
{/*</LevelItem>*/}
</Level>
}
collapsedTitle={
Expand All @@ -150,9 +149,9 @@ export default function Home() {
</StackItem>
</Stack>
</LevelItem>
<LevelItem>
<Link href={"/learning-resources"}>View all</Link>
</LevelItem>
{/*<LevelItem>*/}
{/* <Link href={"/learning-resources"}>View all</Link>*/}
{/*</LevelItem>*/}
</Level>
}
isCompact={true}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
"use client";
import {
QuickStartCatalogPage,
QuickStartContainer,
useLocalStorage,
} from "@/libs/patternfly/quickstarts";
import { QuickStart } from "@patternfly/quickstarts/src/utils/quick-start-types";
} from "@patternfly/quickstarts";
import { useEffect, useState } from "react";
import {
explorePipelinesQuickStart,
Expand Down Expand Up @@ -38,7 +36,7 @@ export default function LearningResources() {
}, [allQuickStartStates]);

const [loading, setLoading] = useState(true);
const [quickStarts, setQuickStarts] = useState<QuickStart[]>([]);
const [quickStarts, setQuickStarts] = useState<any[]>([]);
useEffect(() => {
const load = async () => {
setQuickStarts(exampleQuickStarts);
Expand Down
9 changes: 9 additions & 0 deletions ui/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ const nextConfig = {
typescript: {
//ignoreBuildErrors: true,
},
transpilePackages: [
"@patternfly/quickstarts",
"@patternfly/react-core",
"@patternfly/react-styles",
"@patternfly/react-charts",
"@patternfly/react-table",
"@patternfly/react-tokens",
"@patternfly/react-icons",
],
};

module.exports = withNextIntl(nextConfig);

0 comments on commit 6ac375d

Please sign in to comment.