[Blocks Fixture] Remove remaining Blocks (#18840)

This commit is contained in:
Dan Abramov 2020-05-06 15:53:51 +01:00 committed by GitHub
parent 595d27bd73
commit 33c3af284c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 74 deletions

View File

@ -12,7 +12,7 @@ import FeedPage from './FeedPage';
import ProfilePage from './ProfilePage';
// TODO: Replace with asset reference.
import loadShell from './Shell.block';
import Shell from '../client/Shell';
// TODO: Router component?
const AppRoutes = {
@ -23,7 +23,6 @@ const AppRoutes = {
};
export default function App(props) {
const Shell = loadShell();
const match = matchRoute(props, AppRoutes);
return <Shell>{match}</Shell>;
}

View File

@ -10,10 +10,9 @@ import * as React from 'react';
import {fetch} from 'react-data/fetch';
// TODO: Replace with asset reference.
import loadLink from './Link.block';
import Link from '../client/Link';
export default function Comments({postId}) {
const Link = loadLink();
const comments = fetch(`/comments?postId=${postId}&_expand=user`).json();
return (
<>

View File

@ -1,22 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/first */
import * as React from 'react';
import {unstable_block as block} from 'react';
// Client
// TODO: delete this wrapper.
import ClientLink from '../client/Link';
function Link(props, _) {
return <ClientLink {...props} />;
}
export default block(Link);

View File

@ -11,10 +11,9 @@ import {Suspense} from 'react';
import Comments from './Comments';
// TODO: Replace with asset reference.
import loadLink from './Link.block';
import Link from '../client/Link';
export default function Post({post}) {
const Link = loadLink();
return (
<div
style={{

View File

@ -1,22 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/first */
import * as React from 'react';
import {unstable_block as block} from 'react';
// Client
// TODO: delete this wrapper.
import ClientProfileNav from '../client/ProfileNav';
function ProfileNav(props, _) {
return <ClientProfileNav {...props} />;
}
export default block(ProfileNav);

View File

@ -13,7 +13,7 @@ import ProfileTimeline from './ProfileTimeline';
import ProfileBio from './ProfileBio';
// TODO: Replace with asset reference.
import loadProfileNav from './ProfileNav.block';
import ProfileNav from '../client/ProfileNav';
// TODO: Router component?
const ProfileRoutes = {
@ -23,7 +23,6 @@ const ProfileRoutes = {
export default function ProfilePage(props) {
const user = fetch(`/users/${props.userId}`).json();
const ProfileNav = loadProfileNav();
const match = matchRoute(props, ProfileRoutes);
return (
<>

View File

@ -1,22 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/first */
import * as React from 'react';
import {unstable_block as block} from 'react';
// Client
// TODO: delete this wrapper.
import ClientShell from '../client/Shell';
function Shell(props, _) {
return <ClientShell {...props} />;
}
export default block(Shell);