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

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

Merged
merged 3 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
Copy link
Contributor

@rafegoldberg rafegoldberg Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely in keeping with the other CSS optimizations we've been making! But it'll be difficult to test until we roll an integration, and I know we've had some issue with cross-repo style application before.


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

Expand Down