landscape/Author: remove unnecessary api prop

This commit is contained in:
Matilde Park 2021-03-11 12:46:41 -05:00
parent 5189b3ea20
commit 95e2281d99
6 changed files with 1 additions and 17 deletions

View File

@ -148,17 +148,13 @@ export const LinkItem = (props: LinkItemProps): ReactElement => {
</Anchor>
</Text>
</Box>
<Row minWidth='0' flexShrink={0} width="100%" justifyContent="space-between" py={3} bg="white">
<Author
showImage
ship={author}
date={node.post['time-sent']}
group={group}
api={api}
></Author>
/>
<Box ml="auto">
<Link
to={node.post.pending ? '#' : `${baseUrl}/${index}`}

View File

@ -12,7 +12,6 @@ import {
getSnippet
} from '~/logic/lib/publish';
import { Unreads } from '@urbit/api';
import GlobalApi from '~/logic/api/global';
import ReactMarkdown from 'react-markdown';
import useHarkState from '~/logic/state/hark';
@ -21,7 +20,6 @@ interface NotePreviewProps {
book: string;
node: GraphNode;
baseUrl: string;
api: GlobalApi;
group: Group;
}
@ -96,7 +94,6 @@ export function NotePreview(props: NotePreviewProps) {
date={post?.['time-sent']}
group={group}
unread={isUnread}
api={props.api}
/>
<Box ml="auto" mr={1}>
<Link to={url}>

View File

@ -5,13 +5,11 @@ import { Col, Box, Text, Row } from '@tlon/indigo-react';
import { Contacts, Rolodex, Groups, Associations, Graph, Association, Unreads } from '@urbit/api';
import { NotebookPosts } from './NotebookPosts';
import GlobalApi from '~/logic/api/global';
import { useShowNickname } from '~/logic/lib/util';
import useContactState from '~/logic/state/contact';
import useGroupState from '~/logic/state/group';
interface NotebookProps {
api: GlobalApi;
ship: string;
book: string;
graph: Graph;
@ -40,7 +38,6 @@ export function Notebook(props: NotebookProps & RouteComponentProps): ReactEleme
const contacts = useContactState(state => state.contacts);
const contact = contacts?.[`~${ship}`];
console.log(association.resource);
const showNickname = useShowNickname(contact);
@ -61,7 +58,6 @@ export function Notebook(props: NotebookProps & RouteComponentProps): ReactEleme
host={ship}
book={book}
baseUrl={props.baseUrl}
api={props.api}
group={group}
/>
</Col>

View File

@ -11,7 +11,6 @@ interface NotebookPostsProps {
baseUrl: string;
hideAvatars?: boolean;
hideNicknames?: boolean;
api: GlobalApi;
group: Group;
}
@ -29,7 +28,6 @@ export function NotebookPosts(props: NotebookPostsProps) {
contact={contacts[`~${node.post.author}`]}
node={node}
baseUrl={props.baseUrl}
api={props.api}
group={props.group}
/>
)

View File

@ -11,7 +11,6 @@ import useSettingsState, {selectCalmState} from "~/logic/state/settings";
import useLocalState from "~/logic/state/local";
import OverlaySigil from './OverlaySigil';
import { Sigil } from '~/logic/lib/sigil';
import GlobalApi from '~/logic/api/global';
import Timestamp from './Timestamp';
import useContactState from '~/logic/state/contact';
@ -22,7 +21,6 @@ interface AuthorProps {
children?: ReactNode;
unread?: boolean;
group: Group;
api?: GlobalApi;
}
// eslint-disable-next-line max-lines-per-function

View File

@ -74,7 +74,6 @@ export function CommentItem(props: CommentItemProps): ReactElement {
date={post?.['time-sent']}
unread={props.unread}
group={group}
api={api}
>
<Row alignItems="center">
{adminLinks}