Skip to content

Commit 1a4e21c

Browse files
Luke MortonLuke Morton
authored andcommitted
More prop interface definitions
1 parent 6099a35 commit 1a4e21c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

components/Common/components/Page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import '../rehydrateGlamor'
33
import Head from 'next/head'
44
import { Main } from 'glamorous'
55

6-
export default ({ title, children }) =>
6+
interface PageProps {
7+
title: string
8+
children: any
9+
}
10+
11+
export default ({ title, children }: PageProps) =>
712
<Main margin='6em auto' width='40em'>
813
<Head>
914
<title>{title}</title>

components/User/components/Profile/components/Profile.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ import FriendsList from './FriendsList'
55

66
const Profile = glamorous.div()
77

8-
export default ({ name, biography, twitter, friends }) =>
8+
interface ProfileProps {
9+
name: string
10+
biography: string
11+
twitter: string
12+
friends: any
13+
}
14+
15+
export default ({ name, biography, twitter, friends }: ProfileProps) =>
916
<Profile>
1017
<Header name={name} biography={biography} twitter={twitter} />
1118

0 commit comments

Comments
 (0)