Skip to content

Commit

Permalink
remove skeletons
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 20, 2020
1 parent da31b96 commit f06a725
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
5 changes: 1 addition & 4 deletions docs/src/modules/components/AppFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { LANGUAGES_LABEL } from 'docs/src/modules/constants';
import { pathnameToLanguage } from 'docs/src/modules/utils/helpers';
import { useChangeTheme } from 'docs/src/modules/components/ThemeContext';
import PageContext from 'docs/src/modules/components/PageContext';
import Skeleton from '@material-ui/lab/Skeleton';

const LOCALES = { zh: 'zh-CN', pt: 'pt-BR', es: 'es-ES' };
const CROWDIN_ROOT_URL = 'https://translate.material-ui.com/project/material-ui-docs/';
Expand Down Expand Up @@ -70,9 +69,7 @@ function DeferredAppSearch(props) {
/>
{/* Suspense isn't supported for SSR yet */}
{mounted ? (
<React.Suspense
fallback={<Skeleton className={className} height={40} variant="rect" width={200} />}
>
<React.Suspense fallback={null}>
<AppSearch className={className} />
</React.Suspense>
) : null}
Expand Down
16 changes: 1 addition & 15 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import Menu from '@material-ui/core/Menu';
import MenuItem from '@material-ui/core/MenuItem';
import MoreVertIcon from '@material-ui/icons/MoreVert';
import Tooltip from '@material-ui/core/Tooltip';
import Skeleton from '@material-ui/lab/Skeleton';
import RefreshIcon from '@material-ui/icons/Refresh';
import MarkdownElement from 'docs/src/modules/components/MarkdownElement';
import DemoSandboxed from 'docs/src/modules/components/DemoSandboxed';
Expand Down Expand Up @@ -152,19 +151,6 @@ function getDemoData(codeVariant, demo, githubLocation) {
};
}

function DemoToolbarFallback() {
return (
<React.Fragment>
{/* demo languages placeholder
* since they're hidden by default we use an empty div to position the next
* placeholder properly */}
<div />
{/* header buttons placeholder */}
<Skeleton height={40} variant="rect" width={200} />
</React.Fragment>
);
}

// TODO: replace with React.useOpaqueReference if it is released
function useUniqueId(prefix) {
// useOpaqueReference
Expand Down Expand Up @@ -385,7 +371,7 @@ function Demo(props) {
className={classes.toolbar}
role="toolbar"
>
<NoSsr defer fallback={<DemoToolbarFallback />}>
<NoSsr defer>
<DemoLanguages
demo={demo}
codeOpen={codeOpen}
Expand Down

0 comments on commit f06a725

Please sign in to comment.