Add env variables to test and fix some of them

This commit is contained in:
riggraz
2019-09-24 12:57:32 +02:00
parent 2967b4eba0
commit c554d68f54
6 changed files with 41 additions and 31 deletions

View File

@@ -3,6 +3,8 @@ import { FormEvent } from 'react';
import IPostStatus from '../../interfaces/IPostStatus';
const NO_POST_STATUS_VALUE = 'none';
interface Props {
postStatuses: Array<IPostStatus>;
selectedPostStatusId: number;
@@ -18,7 +20,7 @@ const PostStatusSelect = ({
handleChange,
}: Props) => (
<select
value={selectedPostStatusId || 'Loading...'}
value={selectedPostStatusId || NO_POST_STATUS_VALUE}
onChange={
(e: FormEvent) => (
handleChange(parseInt((e.target as HTMLSelectElement).value))
@@ -34,7 +36,7 @@ const PostStatusSelect = ({
))}
</optgroup>
<optgroup label="No post status">
<option value="none">None</option>
<option value={NO_POST_STATUS_VALUE}>None</option>
</optgroup>
</select>
);