Migrated Timeline to TypeScript
Summary: Migrated Timeline.js to Timeline.tsx Reviewed By: danielbuechele Differential Revision: D17132222 fbshipit-source-id: ffe5b74459d1f3ec48873a94a95c40e855aa45da
This commit is contained in:
committed by
Facebook Github Bot
parent
d3023946da
commit
10e90f3f57
@@ -3,20 +3,19 @@
|
|||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
* @format
|
* @format
|
||||||
* @flow strict-local
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {colors, FlexCenter, styled, LoadingIndicator} from 'flipper';
|
import {colors, FlexCenter, styled, LoadingIndicator} from 'flipper';
|
||||||
import {NavigationInfoBox} from './';
|
import NavigationInfoBox from './NavigationInfoBox';
|
||||||
|
import {Bookmark, NavigationEvent, URI} from '../types';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
import type {Bookmark, NavigationEvent} from '../flow-types';
|
type Props = {
|
||||||
|
bookmarks: Map<string, Bookmark>;
|
||||||
type Props = {|
|
events: Array<NavigationEvent>;
|
||||||
bookmarks: Map<string, Bookmark>,
|
onNavigate: (uri: URI) => void;
|
||||||
events: Array<NavigationEvent>,
|
onFavorite: (uri: URI) => void;
|
||||||
onNavigate: string => void,
|
};
|
||||||
onFavorite: string => void,
|
|
||||||
|};
|
|
||||||
|
|
||||||
const TimelineContainer = styled('div')({
|
const TimelineContainer = styled('div')({
|
||||||
overflowY: 'scroll',
|
overflowY: 'scroll',
|
||||||
@@ -53,7 +52,7 @@ export default (props: Props) => {
|
|||||||
<NoData>No Navigation Events to Show</NoData>
|
<NoData>No Navigation Events to Show</NoData>
|
||||||
) : (
|
) : (
|
||||||
<TimelineContainer>
|
<TimelineContainer>
|
||||||
{events.map((event: NavigationEvent, idx) => {
|
{events.map((event: NavigationEvent, idx: number) => {
|
||||||
return (
|
return (
|
||||||
<NavigationEventContainer>
|
<NavigationEventContainer>
|
||||||
{event.uri != null || event.className != null ? (
|
{event.uri != null || event.className != null ? (
|
||||||
@@ -62,7 +61,7 @@ export default (props: Props) => {
|
|||||||
<img src={event.screenshot} />
|
<img src={event.screenshot} />
|
||||||
) : (
|
) : (
|
||||||
<FlexCenter grow>
|
<FlexCenter grow>
|
||||||
<LoadingIndicator />
|
<LoadingIndicator size={32} />
|
||||||
</FlexCenter>
|
</FlexCenter>
|
||||||
)}
|
)}
|
||||||
</ScreenshotContainer>
|
</ScreenshotContainer>
|
||||||
@@ -16,4 +16,4 @@ export {
|
|||||||
} from './RequiredParametersDialog.tsx';
|
} from './RequiredParametersDialog.tsx';
|
||||||
export {default as SaveBookmarkDialog} from './SaveBookmarkDialog.tsx';
|
export {default as SaveBookmarkDialog} from './SaveBookmarkDialog.tsx';
|
||||||
export {default as SearchBar} from './SearchBar';
|
export {default as SearchBar} from './SearchBar';
|
||||||
export {default as Timeline} from './Timeline';
|
export {default as Timeline} from './Timeline.tsx';
|
||||||
|
|||||||
Reference in New Issue
Block a user