mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[Blocks Fixture] Remove remaining Blocks (#18840)
This commit is contained in:
parent
595d27bd73
commit
33c3af284c
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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={{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -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 (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
Loading…
Reference in New Issue
Block a user