@samitouri / QOS-React-2 / commits / 33c3af284c

[Blocks Fixture] Remove remaining Blocks (#18840)

Dan Abramov committed May 6, 2020 at 15:53 UTC 33c3af284cbbb228199f1e2bd369c6e8efd9763d
7 files changed +4 -74
fixtures/blocks/src/server/App.js
+1 -2
@@ -12,7 +12,7 @@ import FeedPage from './FeedPage';
12 import ProfilePage from './ProfilePage';
13
14 // TODO: Replace with asset reference.
15 -import loadShell from './Shell.block';
15 +import Shell from '../client/Shell';
16
17 // TODO: Router component?
18 const AppRoutes = {
@@ -23,7 +23,6 @@ const AppRoutes = {
23 };
24
25 export default function App(props) {
26 - const Shell = loadShell();
26 const match = matchRoute(props, AppRoutes);
27 return <Shell>{match}</Shell>;
28 }
fixtures/blocks/src/server/Comments.js
+1 -2
@@ -10,10 +10,9 @@ import * as React from 'react';
10 import {fetch} from 'react-data/fetch';
11
12 // TODO: Replace with asset reference.
13 -import loadLink from './Link.block';
13 +import Link from '../client/Link';
14
15 export default function Comments({postId}) {
16 - const Link = loadLink();
16 const comments = fetch(`/comments?postId=${postId}&_expand=user`).json();
17 return (
18 <>
fixtures/blocks/src/server/Link.block.js deleted
-22
@@ -1,22 +0,0 @@
1 -/**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - */
7 -/* eslint-disable import/first */
8 -
9 -import * as React from 'react';
10 -import {unstable_block as block} from 'react';
11 -
12 -// Client
13 -
14 -// TODO: delete this wrapper.
15 -
16 -import ClientLink from '../client/Link';
17 -
18 -function Link(props, _) {
19 - return <ClientLink {...props} />;
20 -}
21 -
22 -export default block(Link);
fixtures/blocks/src/server/Post.js
+1 -2
@@ -11,10 +11,9 @@ import {Suspense} from 'react';
11 import Comments from './Comments';
12
13 // TODO: Replace with asset reference.
14 -import loadLink from './Link.block';
14 +import Link from '../client/Link';
15
16 export default function Post({post}) {
17 - const Link = loadLink();
17 return (
18 <div
19 style={{
fixtures/blocks/src/server/ProfileNav.block.js deleted
-22
@@ -1,22 +0,0 @@
1 -/**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - */
7 -/* eslint-disable import/first */
8 -
9 -import * as React from 'react';
10 -import {unstable_block as block} from 'react';
11 -
12 -// Client
13 -
14 -// TODO: delete this wrapper.
15 -
16 -import ClientProfileNav from '../client/ProfileNav';
17 -
18 -function ProfileNav(props, _) {
19 - return <ClientProfileNav {...props} />;
20 -}
21 -
22 -export default block(ProfileNav);
fixtures/blocks/src/server/ProfilePage.js
+1 -2
@@ -13,7 +13,7 @@ import ProfileTimeline from './ProfileTimeline';
13 import ProfileBio from './ProfileBio';
14
15 // TODO: Replace with asset reference.
16 -import loadProfileNav from './ProfileNav.block';
16 +import ProfileNav from '../client/ProfileNav';
17
18 // TODO: Router component?
19 const ProfileRoutes = {
@@ -23,7 +23,6 @@ const ProfileRoutes = {
23
24 export default function ProfilePage(props) {
25 const user = fetch(`/users/${props.userId}`).json();
26 - const ProfileNav = loadProfileNav();
26 const match = matchRoute(props, ProfileRoutes);
27 return (
28 <>
fixtures/blocks/src/server/Shell.block.js deleted
-22
@@ -1,22 +0,0 @@
1 -/**
2 - * Copyright (c) Facebook, Inc. and its affiliates.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - */
7 -/* eslint-disable import/first */
8 -
9 -import * as React from 'react';
10 -import {unstable_block as block} from 'react';
11 -
12 -// Client
13 -
14 -// TODO: delete this wrapper.
15 -
16 -import ClientShell from '../client/Shell';
17 -
18 -function Shell(props, _) {
19 - return <ClientShell {...props} />;
20 -}
21 -
22 -export default block(Shell);