Skip to content

Commit

Permalink
pages/create-team.tsx to book
Browse files Browse the repository at this point in the history
  • Loading branch information
delgermurun committed Oct 11, 2019
1 parent 89e086b commit 37460b8
Show file tree
Hide file tree
Showing 26 changed files with 260 additions and 130 deletions.
15 changes: 10 additions & 5 deletions book/10-begin/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/10-end/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/11-begin/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/11-end/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/12-begin/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/12-end/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/13-begin/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
15 changes: 10 additions & 5 deletions book/13-end/app/pages/create-team.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const styleGrid = {
height: '100%',
};

type MyProps = { store: Store; isTL: boolean; isMobile: boolean; };
type MyProps = { store: Store; isTL: boolean; isMobile: boolean };

class CreateTeam extends React.Component<MyProps> {
public state = {
Expand All @@ -40,7 +40,7 @@ class CreateTeam extends React.Component<MyProps> {
return;
}

const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];

try {
this.setState({ disabled: true });
Expand Down Expand Up @@ -80,7 +80,7 @@ class CreateTeam extends React.Component<MyProps> {
newAvatarUrl: 'https://storage.googleapis.com/async-await/default-user.png?v=1',
});

document.getElementById('upload-file').value = '';
(document.getElementById('upload-file') as HTMLFormElement).value = '';

Router.push(`/team/${team.slug}/team-settings`);

Expand All @@ -94,7 +94,7 @@ class CreateTeam extends React.Component<MyProps> {
};

public previewAvatar = () => {
const file = document.getElementById('upload-file').files[0];
const file = (document.getElementById('upload-file') as HTMLFormElement).files[0];
if (!file) {
return;
}
Expand All @@ -119,7 +119,12 @@ class CreateTeam extends React.Component<MyProps> {
</Head>
<div style={{ padding: '0px', fontSize: '14px', height: '100%' }}>
<Grid container style={styleGrid}>
<Grid item sm={12} xs={12} style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}>
<Grid
item
sm={12}
xs={12}
style={{ padding: this.props.isMobile ? '0px' : '0px 30px' }}
>
<h3>Create team</h3>
<p />
<form onSubmit={this.onSubmit}>
Expand Down
Loading

0 comments on commit 37460b8

Please sign in to comment.