mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 18:01:32 +03:00
hover
This commit is contained in:
parent
40bc76e8d1
commit
9471ce0815
@ -424,10 +424,10 @@ export const useHovering = (): useHoveringInterface => {
|
||||
};
|
||||
|
||||
export function withHovering<T>(Component: React.ComponentType<T>) {
|
||||
const { hovering, bind } = useHovering();
|
||||
return (props: T) => (
|
||||
<Component hovering={hovering} {...bind} {...props} />
|
||||
)
|
||||
return React.forwardRef((props, ref) => {
|
||||
const { hovering, bind } = useHovering();
|
||||
return <Component ref={ref} hovering={hovering} bind={bind} {...props} />
|
||||
})
|
||||
}
|
||||
|
||||
const DM_REGEX = /ship\/~([a-z]|-)*\/dm--/;
|
||||
|
@ -2,6 +2,7 @@ import { Box, Col } from '@tlon/indigo-react';
|
||||
import { Association, Graph, GraphNode, Group } from '@urbit/api';
|
||||
import bigInt from 'big-integer';
|
||||
import React from 'react';
|
||||
import { withRouter } from 'react-router';
|
||||
import GlobalApi from '~/logic/api/global';
|
||||
import { resourceFromPath } from '~/logic/lib/group';
|
||||
import VirtualScroller from '~/views/components/VirtualScroller';
|
||||
@ -15,7 +16,7 @@ interface PostFeedProps {
|
||||
graph: Graph;
|
||||
graphPath: string;
|
||||
api: GlobalApi;
|
||||
history?: History;
|
||||
history: History;
|
||||
baseUrl: string;
|
||||
parentNode?: GraphNode;
|
||||
grandparentNode?: GraphNode;
|
||||
@ -25,7 +26,7 @@ interface PostFeedProps {
|
||||
pendingSize: number;
|
||||
}
|
||||
|
||||
export class PostFeed extends React.Component<PostFeedProps, PostFeedState> {
|
||||
class PostFeed extends React.Component<PostFeedProps, PostFeedState> {
|
||||
isFetching: boolean;
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -187,3 +188,5 @@ export class PostFeed extends React.Component<PostFeedProps, PostFeedState> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default withRouter(PostFeed);
|
@ -3,7 +3,7 @@ import bigInt from 'big-integer';
|
||||
import React from 'react';
|
||||
import { resourceFromPath } from '~/logic/lib/group';
|
||||
import { Loading } from '~/views/components/Loading';
|
||||
import { PostFeed } from './PostFeed';
|
||||
import PostFeed from './PostFeed';
|
||||
import PostItem from './PostItem/PostItem';
|
||||
|
||||
export default function PostReplies(props) {
|
||||
|
@ -3,7 +3,7 @@ import { Association, Graph, Group } from '@urbit/api';
|
||||
import React, { ReactElement } from 'react';
|
||||
import GlobalApi from '~/logic/api/global';
|
||||
import { Loading } from '~/views/components/Loading';
|
||||
import { PostFeed } from './PostFeed';
|
||||
import PostFeed from './PostFeed';
|
||||
import PostInput from './PostInput';
|
||||
|
||||
interface PostTimelineProps {
|
||||
|
Loading…
Reference in New Issue
Block a user