mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
interface: initial skeleton of post feed, breaking out into different components
This commit is contained in:
parent
4668ce98ae
commit
2dd17ede15
@ -190,7 +190,7 @@ export function GroupsPane(props: GroupsPaneProps) {
|
||||
}}
|
||||
/>
|
||||
<Route
|
||||
path={[relativePath('/'), relativePath('/feed')]}
|
||||
path={[relativePath('/'), relativePath('/feed+')]}
|
||||
render={(routeProps) => {
|
||||
const shouldHideSidebar =
|
||||
routeProps.location.pathname.includes('/feed');
|
||||
|
@ -1,32 +1,24 @@
|
||||
import React from 'react';
|
||||
import { Box, Col, Row, Text } from '@tlon/indigo-react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Box, Row, Text } from '@tlon/indigo-react'
|
||||
import { GroupFeedHeader } from './GroupFeedHeader';
|
||||
import { PostInput } from './PostInput';
|
||||
import { PostFeed } from './PostFeed';
|
||||
|
||||
|
||||
export function GroupFeedHeader(props) {
|
||||
const { baseUrl } = props;
|
||||
|
||||
return (
|
||||
<Row
|
||||
width="100%"
|
||||
height="48px"
|
||||
pl="2"
|
||||
pr="2"
|
||||
alignItems="center"
|
||||
borderBottom={1}
|
||||
borderColor="washedGray">
|
||||
<Link to={baseUrl}><Text>{'<- Back'}</Text></Link>
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
export function GroupFeed(props) {
|
||||
const { baseUrl } = props;
|
||||
const { baseUrl, api, history } = props;
|
||||
|
||||
return (
|
||||
<Box width="100%" height="100%">
|
||||
<GroupFeedHeader baseUrl={baseUrl} />
|
||||
<Row width="100%">
|
||||
<Box
|
||||
width="100%"
|
||||
height="100%"
|
||||
display="flex"
|
||||
flexDirection="column"
|
||||
alignItems="center">
|
||||
<GroupFeedHeader baseUrl={baseUrl} history={history} />
|
||||
<Row width="100%" maxWidth="616px" pt="4" pl="" pr="2" flexGrow="1">
|
||||
<PostInput api={api} />
|
||||
<PostFeed />
|
||||
</Row>
|
||||
</Box>
|
||||
);
|
||||
|
@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import { Row, Text } from '@tlon/indigo-react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
|
||||
export function GroupFeedHeader(props) {
|
||||
const { baseUrl, history } = props;
|
||||
|
||||
return (
|
||||
<Row
|
||||
flexShrink="1"
|
||||
width="100%"
|
||||
height="48px"
|
||||
pl="2"
|
||||
pr="2"
|
||||
alignItems="center"
|
||||
borderBottom={1}
|
||||
borderColor="washedGray">
|
||||
{ baseUrl !== history.location.pathname ? (
|
||||
<Link to={baseUrl}><Text>{'<- Back'}</Text></Link>
|
||||
) : null
|
||||
}
|
||||
</Row>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@tlon/indigo-react';
|
||||
|
||||
|
||||
export function PostFeed(props) {
|
||||
return <Box></Box>;
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@tlon/indigo-react';
|
||||
|
||||
|
||||
export function PostInput(props) {
|
||||
return (
|
||||
<Box mb="3" width="100%" height="96px" border={1} borderColor="washedGray">
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user