Skip to content

Commit

Permalink
fix: build storybook error (#111)
Browse files Browse the repository at this point in the history
* fix: build storybook error

* feat: GH to verify storybook build
  • Loading branch information
gsulloa authored Sep 24, 2020
1 parent 666d0b2 commit 7dcdeeb
Show file tree
Hide file tree
Showing 5 changed files with 449 additions and 394 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/verify-storybook-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is a basic workflow to help you get started with Actions

name: Verify storybook buiild

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the dev branch
on:
push:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-and-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2

- uses: c-hive/gha-yarn-cache@v1

- name: Install JS dependencies
run: yarn install
- name: Build storybook
run: yarn build-storybook
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"react-scripts": "3.4.3",
"rut-helpers": "^0.1.1",
"rxjs": "^6.6.3",
"typescript": "~4.0.3"
"typescript": "3.9.5"
},
"peerDependencies": {
"react": "^16.13.1",
Expand Down
2 changes: 0 additions & 2 deletions src/components/ImageLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { makeStyles } from '@material-ui/core/styles';
import { TextFieldProps } from '@material-ui/core';
import IconButton from '@material-ui/core/IconButton';
import Card from '@material-ui/core/Card';
import CardMedia from '@material-ui/core/CardMedia';
import CardActionArea from '@material-ui/core/CardActionArea';
import CardActions from '@material-ui/core/CardActions';
import Divider from '@material-ui/core/Divider';
import PhotoCamera from '@material-ui/icons/PhotoCamera';
import LinearProgress from '@material-ui/core/LinearProgress';
import CardContent from '@material-ui/core/CardContent';
import DeleteIcon from '@material-ui/icons/Delete';

const useStyles = makeStyles({
Expand Down
6 changes: 2 additions & 4 deletions src/validators/DateValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* File Created: Thursday, 3rd September 2020 6:40:13 pm
* Author: Esperanza Horn ([email protected])
* -----
* Last Modified: Friday, 4th September 2020 4:40:57 pm
* Modified By: Esperanza Horn (esperanza@inventures.cl)
* Last Modified: Thursday, 24th September 2020 3:12:13 pm
* Modified By: Gabriel Ulloa (gabriel@inventures.cl)
* -----
* Copyright 2020 - 2020 Incrementa Ventures SpA. ALL RIGHTS RESERVED
* Terms and conditions defined in license.txt
Expand All @@ -18,12 +18,10 @@ export class DateValidator extends Validator {
dateRegex = new RegExp(/^([\d+]{2})\/([\d+]{2})\/([\d+]{4})$/);
constructor(errorMsg: string) {
super(errorMsg);
this.dateRegex = this.dateRegex;
}
validate(input: string) {
if (Boolean(input.match(this.dateRegex))) {
const date = input.split('/');
const inputDate = new Date(+date[2], +date[1] - 1, +date[0]);
const correctDayMonth =
+date[0] >= 1 && +date[0] <= 31 && +date[1] >= 1 && +date[1] <= 12;
const thisYear = new Date().getFullYear();
Expand Down
Loading

0 comments on commit 7dcdeeb

Please sign in to comment.