Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
fix(ui components): remove a stylesheet import that's now redundant (#…
Browse files Browse the repository at this point in the history
…1164)

* fix(ui components): remove a stylesheet import that's now redundant

* chore(recipes): update copy

* fix: bring back recipes toggle

It was broken in the demo app, this appears to do the trick!
  • Loading branch information
kanadgupta authored Feb 2, 2021
1 parent 9e6be79 commit 5578d40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
16 changes: 7 additions & 9 deletions example/src/Demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class Demo extends React.Component {
description: 'Enable our request body JSON editor.',
stateProp: 'enableJsonEditor',
},
'Enable tutorials (beta)': {
description: 'Enable our tutorials beta.',
'Enable recipes (beta)': {
description: 'Enable our recipes beta.',
stateProp: 'enableTutorials',
},
};
Expand Down Expand Up @@ -156,12 +156,12 @@ class Demo extends React.Component {
if (enableTutorials) {
docs.forEach((doc, i) => {
// Only add our mock tutorials if we don't have them present.
if (!('tutorials' in doc)) {
if ('tutorials' in doc) {
docs[i].tutorials = [
{
title: 'Test Tutorial',
description: 'Tutorial description',
slug: 'test-tutorial',
title: 'Test Recipe',
description: 'Recipe description',
slug: 'test-recipe',
backgroundColor: '#018FF4',
emoji: '🦉',
_id: '123',
Expand Down Expand Up @@ -195,9 +195,7 @@ class Demo extends React.Component {
});
} else {
docs.forEach((doc, i) => {
if (!('tutorials' in doc)) {
docs[i].tutorials = [];
}
docs[i].tutorials = [];
});
}

Expand Down
1 change: 0 additions & 1 deletion packages/api-explorer/src/Doc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const Oas = require('oas/tooling');
const { getPath, matchesMimeType } = require('oas/tooling/utils');

const { TutorialTile } = require('@readme/ui/.bundles/es/ui/compositions');
require('@readme/ui/.bundles/umd/main.css');

const isAuthReady = require('./lib/is-auth-ready');

Expand Down

0 comments on commit 5578d40

Please sign in to comment.