// @flow import React from 'react'; import compose from 'recompose/compose'; import Thread from './thread'; const ProfilePure = (props: Object): ?React$Element => { const { type } = props; switch (type) { case 'thread': { return ; } default: { return null; } } }; export type ProfileSizeProps = | 'mini' | 'full' | 'miniWithAction' | 'upsell' | 'simple' | 'listItemWithAction'; type ProfileProps = { data: Object, profileSize?: ProfileSizeProps, }; /* Create exportables which just wrap a type prop, so in the UI we can Write and this file will handle the type declaration, which will then get passed to our switch statement above to return the right component. */ export const Profile = compose()(ProfilePure); export const ThreadProfile = (props: ProfileProps) => ( );