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:
Benjamin Elo
2019-09-02 03:54:48 -07:00
committed by Facebook Github Bot
parent d3023946da
commit 10e90f3f57
2 changed files with 12 additions and 13 deletions

View File

@@ -3,20 +3,19 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
* @flow strict-local
*/
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>,
events: Array<NavigationEvent>,
onNavigate: string => void,
onFavorite: string => void,
|};
type Props = {
bookmarks: Map<string, Bookmark>;
events: Array<NavigationEvent>;
onNavigate: (uri: URI) => void;
onFavorite: (uri: URI) => void;
};
const TimelineContainer = styled('div')({
overflowY: 'scroll',
@@ -53,7 +52,7 @@ export default (props: Props) => {
<NoData>No Navigation Events to Show</NoData>
) : (
<TimelineContainer>
{events.map((event: NavigationEvent, idx) => {
{events.map((event: NavigationEvent, idx: number) => {
return (
<NavigationEventContainer>
{event.uri != null || event.className != null ? (
@@ -62,7 +61,7 @@ export default (props: Props) => {
<img src={event.screenshot} />
) : (
<FlexCenter grow>
<LoadingIndicator />
<LoadingIndicator size={32} />
</FlexCenter>
)}
</ScreenshotContainer>

View File

@@ -16,4 +16,4 @@ export {
} from './RequiredParametersDialog.tsx';
export {default as SaveBookmarkDialog} from './SaveBookmarkDialog.tsx';
export {default as SearchBar} from './SearchBar';
export {default as Timeline} from './Timeline';
export {default as Timeline} from './Timeline.tsx';