Skip to content

Commit

Permalink
fix(ascii): Remove ascii doc examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlabaj committed Feb 27, 2024
1 parent 57d2953 commit 5d2d9ee
Show file tree
Hide file tree
Showing 36 changed files with 4 additions and 2,474 deletions.
283 changes: 0 additions & 283 deletions packages/dev/quickstart-adoc.js

This file was deleted.

15 changes: 2 additions & 13 deletions packages/dev/src/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
QuickStartDrawer,
useLocalStorage,
} from '@patternfly/quickstarts';
import { loadJSONQuickStarts } from './quickstarts-data/asciidoc/quickstartLoader';
import { allQuickStarts as yamlQuickStarts } from './quickstarts-data/quick-start-test-data';
import React from 'react';
import i18n from './i18n/i18n';
Expand All @@ -31,22 +30,12 @@ const App: React.FC<AppProps> = ({ children, showCardFooters }) => {
console.log(allQuickStartStates);
}, [allQuickStartStates]);

const [allQuickStarts, setAllQuickStarts] = React.useState<QuickStart[]>([]);
React.useEffect(() => {
const load = async () => {
const masGuidesQuickstarts = await loadJSONQuickStarts('');
setAllQuickStarts(yamlQuickStarts.concat(masGuidesQuickstarts));
};
setTimeout(() => {
load();
}, 500);
}, []);

const language = localStorage.getItem('bridge/language') || 'en';
const resourceBundle = i18n.getResourceBundle(language, 'quickstart');

const valuesForQuickstartContext: QuickStartContextValues = {
allQuickStarts,
allQuickStarts: yamlQuickStarts,
activeQuickStartID,
setActiveQuickStartID,
allQuickStartStates,
Expand All @@ -65,7 +54,7 @@ const App: React.FC<AppProps> = ({ children, showCardFooters }) => {

return (
<React.Suspense fallback={<LoadingBox />}>
{allQuickStarts && allQuickStarts.length ? (
{yamlQuickStarts && yamlQuickStarts.length ? (
<QuickStartContextProvider value={valuesForQuickstartContext}>
<QuickStartDrawer>
<Page header={AppHeader} sidebar={AppSidebar} isManagedSidebar>
Expand Down
18 changes: 2 additions & 16 deletions packages/dev/src/AppProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import './App.css';
import { Page, Button } from '@patternfly/react-core';
import {
LoadingBox,
QuickStart,
QuickStartContainer,
QuickStartContainerProps,
useLocalStorage,
setQueryArgument,
removeQueryArgument,
QUICKSTART_ID_FILTER_KEY,
} from '@patternfly/quickstarts';
import { loadJSONQuickStarts } from './quickstarts-data/asciidoc/quickstartLoader';
import { allQuickStarts as yamlQuickStarts } from './quickstarts-data/quick-start-test-data';
import React from 'react';
import i18n from './i18n/i18n';
Expand All @@ -35,31 +33,19 @@ const App: React.FC<AppProps> = ({ children, showCardFooters }) => {
console.log(allQuickStartStates);
}, [allQuickStartStates]);

const [loading, setLoading] = React.useState(true);
const [quickStarts, setQuickStarts] = React.useState<QuickStart[]>([]);
React.useEffect(() => {
const load = async () => {
const masGuidesQuickstarts = await loadJSONQuickStarts('');
setQuickStarts(yamlQuickStarts.concat(masGuidesQuickstarts));
setLoading(false);
};
setTimeout(() => {
load();
}, 500);
}, []);


const withQueryParams = true;

const drawerProps: QuickStartContainerProps = {
quickStarts,
quickStarts: yamlQuickStarts,
activeQuickStartID,
allQuickStartStates,
setActiveQuickStartID,
setAllQuickStartStates,
resourceBundle,
showCardFooters,
language,
loading,
useQueryParams: withQueryParams,
alwaysShowTaskReview: true,
markdown: {
Expand Down
8 changes: 0 additions & 8 deletions packages/dev/src/quickstarts-data/asciidoc/.build/README.md

This file was deleted.

Loading

0 comments on commit 5d2d9ee

Please sign in to comment.