Skip to content

Commit

Permalink
Small flow cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lgeiger authored and rgbkrk committed Nov 10, 2018
1 parent f9295cf commit 66a8422
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 34 deletions.
Empty file removed components/contributors/index.js
Empty file.
Empty file.
2 changes: 0 additions & 2 deletions components/cutoff-image/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// @flow
import * as React from "react";

import { StyledCutoffImage } from "@components/cutoff-image/styled";

const CutoffImage = StyledCutoffImage;
Expand Down
10 changes: 4 additions & 6 deletions components/footer/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import React from "react";
// @flow
import * as React from "react";
import Link from "next/link";
import { navigation, NavItems } from "@components/header";
import { StyledFooter } from "@components/footer/styled";

const Footer = props => (
const Footer = () => (
<StyledFooter>
<StyledFooter.Wrapper>
<StyledFooter.Section>
<Link href="https://numfocus.org/">
<a target="_blank">
<img
src="/static/sponsor-numfocus.png"
alt="NumFocus"
/>
<img src="/static/sponsor-numfocus.png" alt="NumFocus" />
</a>
</Link>
</StyledFooter.Section>
Expand Down
1 change: 1 addition & 0 deletions components/footer/styled/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @flow
import styled, { css } from "styled-components";
import { sif, defaultWrapper } from "@common/styled";

Expand Down
7 changes: 4 additions & 3 deletions components/hero/pattern.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import styled from 'styled-components';
// @flow
import * as React from "react";
import styled from "styled-components";

const StyledSVG = styled.svg`
display: block;
`;
export default ({ width, ...rest }) => (
export default () => (
<StyledSVG width="1422px" height="542px" viewBox="0 0 1422 542">
<defs>
<linearGradient
Expand Down
3 changes: 2 additions & 1 deletion components/hero/styled/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @flow
import styled, { css } from "styled-components";
import { spacing } from "@common/constants";
import { colors } from "@common/colors";
Expand Down Expand Up @@ -67,7 +68,7 @@ const StyledHero = styled.div`
position: relative;
a{
&:link,
&:visited,
&:visited,
&:active,
&:hover{
color: white;
Expand Down
4 changes: 3 additions & 1 deletion components/navigation/navigation-left.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
// @flow
import * as React from "react";
import Link from "next/link";
// $FlowFixMe
import styles from "./navigation.scss";

export default () => (
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/navigation-right.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from "react";
import * as React from "react";
import Link from "next/link";

export default () => (
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/social-buttons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from "react";
import * as React from "react";

export const SlackButton = () => (
<a
Expand Down
Empty file removed components/page/index.js
Empty file.
Empty file removed components/page/styled/index.js
Empty file.
1 change: 1 addition & 0 deletions components/typography/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @flow
import { StyledType as Type, BashPre } from "@components/typography/styled";

export { Type, BashPre };
1 change: 1 addition & 0 deletions components/typography/styled/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @flow
import styled, { css } from "styled-components";
import { fonts } from "@common/constants";
import { colors } from "@common/colors";
Expand Down
16 changes: 11 additions & 5 deletions components/video/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
// @flow
import * as React from "react";
import styled, { css } from "styled-components";
import { handheld, desktop } from "@common/mixins";
const Video = ({ mp4, webm, poster }) => (
<video poster={poster} preload="auto" autoPlay muted loop="loop">
{mp4 ? <source src={mp4} type="video/mp4" /> : null}
{webm ? <source src={webm} type="video/webm" /> : null}

type VideoProps = { mp4?: string, webm?: string, poster?: string };

const Video = (props: VideoProps) => (
<video poster={props.poster} preload="auto" autoPlay muted loop="loop">
{props.mp4 ? <source src={props.mp4} type="video/mp4" /> : null}
{props.webm ? <source src={props.webm} type="video/webm" /> : null}
</video>
);
export { Video, StyledVideoPlaceholder };

export { Video };
3 changes: 1 addition & 2 deletions pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import {
StyledPersonTitle,
StyledPersonSocial,
StyledPersonSocialItem,
StyledGridWrapper,
StyledGrid
StyledGridWrapper
} from "@components/layout/styled";
import { ContentSection } from "@components/content-section";
import { PageHeader } from "@components/page-header";
Expand Down
13 changes: 1 addition & 12 deletions pages/atom.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@
import * as React from "react";
import { colors } from "@common/colors";
import Layout from "@components/layout";
import { Video } from "@components/video";
import { Hero } from "@components/hero";
import { Type, BashPre } from "@components/typography";
import { ContentSection, ContentSections } from "@components/content-section";
import { Button, Buttons } from "@components/button";
import { CutoffImage } from "@components/cutoff-image";

type VideoProps =
| { mp4: string, webm: string, poster: string }
| { mp4: string, poster: string }
| { webm: string, poster: string };

const Video = (props: VideoProps) => (
<video poster={props.poster} preload="auto" autoPlay muted loop="loop">
{props.mp4 ? <source src={props.mp4} type="video/mp4" /> : null}
{props.webm ? <source src={props.webm} type="video/webm" /> : null}
</video>
);

const InspectCode = () => (
<ContentSection center>
<ContentSection.Pane visual>
Expand Down

1 comment on commit 66a8422

@vercel
Copy link

@vercel vercel bot commented on 66a8422 Nov 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully aliased the URL https://nteract-site-iklkvwhtxv.now.sh to the following alias.

Please sign in to comment.