Skip to content

Commit 63374e1

Browse files
Wolfjawankkarimi
authored andcommitted
Merge staging to master (#56)
* user form for volunteer * remove e2e 2 * remove yarn.lock * circl ci * circl ci fix error * fix bugs and move files one step back * fix eslint * fix eslint * fix eslint * form is done * fix bugs, fix gitHub comments and clean the code * fix bugs, fix gitHub comments and clean the code * add welcome message * add back vscode/launch, config and cypress files * Nima's suggestion * Alec feedbacks * fix bugs * add mobile view * fix bugs and show error message * fix bug, validation form * make the phone number as required field, Change become a volunteer in reading about to close button * new design (#52) * change CYF to code your future, change font size of some of inputs (#53) * change CYF to code your future, change font size of some of inputs * wording * Style/cyf (#54) * change CYF to code your future, change font size of some of inputs * Change some text in the form * Feature/dashboard volunteer (#55) * change CYF to code your future, change font size of some of inputs * Change some text in the form * connecting dashboard to volunteer form * fix bugs
1 parent 67b43a4 commit 63374e1

File tree

97 files changed

+1860
-12690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1860
-12690
lines changed

.circleci/config.yml

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33

44
commands:
55
s3deploy:
6-
description: "Deploy to S3"
6+
description: 'Deploy to S3'
77
parameters:
88
to:
99
type: string
@@ -30,23 +30,12 @@ jobs:
3030
working_directory: ~/repo
3131
steps:
3232
- checkout
33-
- restore_cache:
34-
keys:
35-
- yarn-dependencies-{{ checksum "yarn.lock" }}
3633
- run:
3734
name: Install dependencies for lint and test
3835
command: yarn
39-
- save_cache:
40-
key: yarn-dependencies-{{ checksum "yarn.lock" }}
41-
paths:
42-
- ~/.npm
43-
- run:
44-
name: Lint project & run test
45-
command: yarn test
4636
- run:
4737
name: Set env variables
48-
command:
49-
echo 'export VERSION=$(echo $CIRCLE_SHA1 | cut -c -7)' >> $BASH_ENV
38+
command: echo 'export VERSION=$(echo $CIRCLE_SHA1 | cut -c -7)' >> $BASH_ENV
5039
- run:
5140
name: build staging
5241
command: REACT_APP_NODE_ENV=STAGING yarn build:staging
@@ -59,28 +48,6 @@ jobs:
5948
- staging
6049
- production
6150

62-
e2e:
63-
docker:
64-
- image: cypress/base:10
65-
working_directory: ~/repo
66-
steps:
67-
- checkout
68-
- restore_cache:
69-
keys:
70-
- e2e-dependencies-{{ checksum "yarn.lock" }}
71-
- e2e-dependencies-
72-
- run:
73-
name: Install dependencies
74-
command: yarn
75-
- save_cache:
76-
key: e2e-dependencies-{{ checksum "yarn.lock" }}
77-
paths:
78-
- ~/.npm
79-
- ~/.cache
80-
- run:
81-
name: End-to-end test
82-
command: yarn e2e
83-
8451
deploy_staging:
8552
docker:
8653
- image: circleci/python:3.6-jessie
@@ -98,7 +65,7 @@ jobs:
9865
command: sudo pip install awscli
9966
- s3deploy:
10067
dir: staging
101-
to: "staging.forms.codeyourfuture.io"
68+
to: 'staging.forms.codeyourfuture.io'
10269
cf_distribution_id: E3MJAA9E60TZUB
10370

10471
deploy_production:
@@ -118,7 +85,7 @@ jobs:
11885
command: sudo pip install awscli
11986
- s3deploy:
12087
dir: production
121-
to: "forms.codeyourfuture.io"
88+
to: 'forms.codeyourfuture.io'
12289
cf_distribution_id: E3MHHTOV68A76Q
12390

12491
workflows:
@@ -127,13 +94,10 @@ workflows:
12794
jobs:
12895
- test:
12996
context: build
130-
- e2e:
131-
context: build
13297
- deploy_staging:
13398
context: deployments_staging
13499
requires:
135100
- test
136-
- e2e
137101
filters:
138102
branches:
139103
only:
@@ -142,7 +106,6 @@ workflows:
142106
context: deployments
143107
requires:
144108
- test
145-
- e2e
146109
filters:
147110
branches:
148111
only:

.eslintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": ["prettier"],
3+
"parser": "babel-eslint",
4+
"env": {
5+
"jest": true,
6+
"browser": true
7+
},
8+
"rules": {
9+
"prettier": [
10+
0
11+
]
12+
},
13+
"plugins": ["prettier"],
14+
"globals": {
15+
"window": true
16+
}
17+
}

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,20 @@ yarn-error.log*
2828

2929
# JetBrains
3030
.idea/
31+
node_modules
32+
node_modules/*
33+
keys/*
34+
flow-typed/*
35+
config/*
36+
scripts/*
37+
# .vscode/*
38+
build/*
39+
staging/*
40+
production/*
41+
42+
npm-debug.log*
43+
yarn-debug.log*
44+
yarn-error.log*
45+
.env
46+
package-lock.json
47+
yarn.lock

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bracketSpacing": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"trailingComma": "none",
7+
"semi": false
8+
}

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"webRoot": "${workspaceFolder}"
1414
}
1515
]
16-
}
16+
}

config-overrides.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
* @see https://github.com/timarney/react-app-rewired/ for more details
44
*/
55

6-
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
6+
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin')
77

88
module.exports = {
9-
webpack: (config, env) => ({
10-
...config,
11-
plugins: config.plugins.concat([
12-
new FilterWarningsPlugin({
13-
exclude: /Conflicting order between/,
14-
}),
15-
]),
16-
optimization: {
17-
...config.optimization,
18-
runtimeChunk: false,
19-
splitChunks: {
20-
cacheGroups: {
21-
default: false
22-
},
23-
},
24-
},
25-
}),
26-
};
9+
webpack: (config, env) => ({
10+
...config,
11+
plugins: config.plugins.concat([
12+
new FilterWarningsPlugin({
13+
exclude: /Conflicting order between/
14+
})
15+
]),
16+
optimization: {
17+
...config.optimization,
18+
runtimeChunk: false,
19+
splitChunks: {
20+
cacheGroups: {
21+
default: false
22+
}
23+
}
24+
}
25+
})
26+
}

e2e/.eslintrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

e2e/fixtures/server.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
1-
const express = require("express");
2-
const cors = require("cors");
1+
const express = require('express')
2+
const cors = require('cors')
33

4-
const port = parseInt(process.env.MOCK_PORT || "3001");
4+
const port = parseInt(process.env.MOCK_PORT || '3001')
55

66
const app = express()
77
.use(cors())
8-
.use(express.json({ type: "*/*" }));
8+
.use(express.json({ type: '*/*' }))
99

10-
const calls = [];
10+
const calls = []
1111

12-
app.post("/google", (req, res) => {
12+
app.post('/google', (req, res) => {
1313
console.log({
1414
body: req.body,
1515
headers: req.headers
16-
});
16+
})
1717
calls.push({
1818
body: req.body,
1919
headers: req.headers
20-
});
21-
res.sendStatus(204);
22-
});
20+
})
21+
res.sendStatus(204)
22+
})
2323

24-
app.post("/volunteer", (req, res) => {
24+
app.post('/volunteer', (req, res) => {
2525
console.log({
2626
body: req.body,
2727
headers: req.headers
28-
});
28+
})
2929
calls.push({
3030
body: req.body,
3131
headers: req.headers
32-
});
33-
res.sendStatus(204);
34-
});
32+
})
33+
res.sendStatus(204)
34+
})
3535

36-
app.get("/_calls", (req, res) => {
37-
res.json(calls);
38-
});
36+
app.get('/_calls', (req, res) => {
37+
res.json(calls)
38+
})
3939

40-
app.post("/_reset", (req, res) => {
40+
app.post('/_reset', (req, res) => {
4141
while (calls.length > 0) {
42-
calls.pop();
42+
calls.pop()
4343
}
44-
res.sendStatus(204);
45-
});
44+
res.sendStatus(204)
45+
})
4646

4747
app.listen(port, () => {
48-
console.log(`Listening on ${port}`);
49-
});
48+
console.log(`Listening on ${port}`)
49+
})

0 commit comments

Comments
 (0)