Skip to content

Commit 3d6d624

Browse files
dipscoderSHITIZ-AGGARWALAbhishek-kumar09symaticvisualsdependabot[bot]
authored
Display event (#84)
* Display user's upcoming events * Display Individual event * Display new events * Added designs * Add README * landing page v-1 (#59) * landing page v-1 * landing page v-1 * landing page v-1 * page v2 * v2 * Bump typescript from 3.9.9 to 4.3.2 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.9 to 4.3.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v3.9.9...v4.3.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * landing page done * landing page done - generalized fonts * landing page done - production build * Create events (#79) * Initial commit * Complete eventForm with image upload * Store images into specific user * Make cancel btn working * Format file * Update * Added designs * Add README * Fix homepage responsiveness Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Abhishek Kumar <[email protected]> Co-authored-by: Dipesh Jaiswal <[email protected]> Co-authored-by: SHITIZ-AGGARWAL <[email protected]> Co-authored-by: SHITIZ AGGARWAL <[email protected]> * Hide bookmark and searchbar * Display number of events conducted * Remove warnings * Bump react-helmet from 5.2.1 to 6.1.0 (#93) Bumps [react-helmet](https://github.com/nfl/react-helmet) from 5.2.1 to 6.1.0. - [Release notes](https://github.com/nfl/react-helmet/releases) - [Changelog](https://github.com/nfl/react-helmet/blob/master/CHANGELOG.md) - [Commits](https://github.com/nfl/react-helmet/commits/6.1.0) --- updated-dependencies: - dependency-name: react-helmet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix card styling * fix linting errors and package fixes * Fix New Event checkout btn * Fix user and eventID null problem * Fix * formatting * Add parentheses * Remove log statements and other things * Remove spaces Co-authored-by: SHITIZ-AGGARWAL <[email protected]> Co-authored-by: SHITIZ AGGARWAL <[email protected]> Co-authored-by: Abhishek Kumar <[email protected]> Co-authored-by: Deepanshu Goel <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent b172a4c commit 3d6d624

Some content is hidden

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

57 files changed

+35073
-21842
lines changed

.eslintrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
"jsx-a11y/click-events-have-key-events": "off",
3939
"jsx-a11y/no-static-element-interactions": "off",
4040
"jsx-a11y/control-has-associated-label": "off",
41-
"jsx-a11y/anchor-is-valid": "off"
41+
"jsx-a11y/anchor-is-valid": "off",
42+
"react/prop-types": "off",
43+
"react/no-array-index-key": "off",
44+
"react/destructuring-assignment": "warn",
45+
"no-use-before-define": "warn",
46+
"no-unused-vars": "warn",
47+
"react/jsx-indent": "warn",
48+
"jsx-a11y/no-noninteractive-element-interactions": "warn"
4249
}
4350
}

package-lock.json

Lines changed: 34552 additions & 6938 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"build": "react-scripts build",
1212
"test": "react-scripts test",
1313
"eject": "react-scripts eject",
14-
"format": "prettier --write \"**/*.+(js|jsx|json|css|md)\""
14+
"format": "prettier --write \"**/*.+(js|jsx|json|css|md)\"",
15+
"lint:fix": "eslint ./src/ --fix"
1516
},
1617
"browserslist": {
1718
"production": [
@@ -52,7 +53,7 @@
5253
"chart.js": "^2.9.3",
5354
"clsx": "^1.1.0",
5455
"date-fns": "^2.22.1",
55-
"firebase": "^7.19.1",
56+
"firebase": "^8.6.7",
5657
"history": "^4.10.1",
5758
"immer": "^8.0.1",
5859
"js-cookie": "^2.2.1",
@@ -87,7 +88,7 @@
8788
"react-router": "^5.1.2",
8889
"react-router-dom": "^5.1.2",
8990
"react-router-hash-link": "^2.4.3",
90-
"react-scripts": "^3.4.1",
91+
"react-scripts": "^4.0.3",
9192
"react-slick": "^0.28.1",
9293
"react-swipeable-views": "^0.13.9",
9394
"redux": "^4.0.5",
@@ -99,15 +100,14 @@
99100
"uuid": "^7.0.3"
100101
},
101102
"devDependencies": {
102-
"eslint": "^6.8.0",
103-
"eslint-config-airbnb": "^18.1.0",
104-
"eslint-config-prettier": "^6.10.1",
103+
"eslint-config-airbnb": "^18.2.1",
104+
"eslint-config-prettier": "^8.3.0",
105105
"eslint-plugin-import": "^2.20.2",
106-
"eslint-plugin-jsx-a11y": "^6.2.3",
106+
"eslint-plugin-jsx-a11y": "^6.4.1",
107107
"eslint-plugin-mdx": "^1.6.8",
108-
"eslint-plugin-prettier": "^3.1.2",
109-
"eslint-plugin-react": "^7.19.0",
110-
"eslint-plugin-react-hooks": "^2.5.1",
108+
"eslint-plugin-prettier": "^3.4.0",
109+
"eslint-plugin-react": "^7.24.0",
110+
"eslint-plugin-react-hooks": "^4.2.0",
111111
"mdx-loader": "^3.0.2",
112112
"prettier": "^1.19.1",
113113
"typescript": "^4.3.2"

src/App.js

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,29 @@ library.add(fab, faEnvelope);
3030
const history = createBrowserHistory();
3131
const jss = create({ plugins: [...jssPreset().plugins, rtl()] });
3232

33-
const useStyles = makeStyles(() =>
34-
createStyles({
35-
'@global': {
36-
'*': {
37-
boxSizing: 'border-box',
38-
margin: 0,
39-
padding: 0
40-
},
41-
html: {
42-
'-webkit-font-smoothing': 'antialiased',
43-
'-moz-osx-font-smoothing': 'grayscale',
44-
height: '100%',
45-
width: '100%'
46-
},
47-
body: {
48-
height: '100%',
49-
width: '100%'
50-
},
51-
'#root': {
52-
height: '100%',
53-
width: '100%'
54-
}
33+
const useStyles = makeStyles(() => createStyles({
34+
'@global': {
35+
'*': {
36+
boxSizing: 'border-box',
37+
margin: 0,
38+
padding: 0
39+
},
40+
html: {
41+
'-webkit-font-smoothing': 'antialiased',
42+
'-moz-osx-font-smoothing': 'grayscale',
43+
height: '100%',
44+
width: '100%'
45+
},
46+
body: {
47+
height: '100%',
48+
width: '100%'
49+
},
50+
'#root': {
51+
height: '100%',
52+
width: '100%'
5553
}
56-
})
57-
);
54+
}
55+
}));
5856

5957
function App() {
6058
useStyles();

src/Routes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const renderRoutes = () => (
2020
<Route
2121
path="/"
2222
exact
23-
render={props => (
23+
render={(props) => (
2424
<MainLayout>
2525
<HomeView {...props} />
2626
</MainLayout>
@@ -32,7 +32,7 @@ const renderRoutes = () => (
3232
<Route path="/events" exact render={() => <EventDefaultPage />} />
3333
<Route path="/landing" exact render={() => <LandingPage />} />
3434
<Route
35-
path="/events/individual-event"
35+
path="/events/:eventID"
3636
exact
3737
render={() => <IndividualEvent />}
3838
/>

src/actions/accountActions.js

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,28 @@ export const REGISTER = '@account/register';
1111
export const UPDATE_PROFILE = '@account/update-profile';
1212

1313
export function login() {
14-
return async dispatch => {
14+
return async (dispatch) => {
1515
dispatch({ type: LOGIN_REQUEST });
1616
};
1717
}
1818

1919
export function dismissLogin() {
20-
return async dispatch => {
20+
return async (dispatch) => {
2121
dispatch({ type: DISMISS_LOGIN });
2222
};
2323
}
2424

2525
export function setUserData(user) {
26-
return dispatch =>
27-
dispatch({
28-
type: SILENT_LOGIN,
29-
payload: {
30-
user
31-
}
32-
});
26+
return (dispatch) => dispatch({
27+
type: SILENT_LOGIN,
28+
payload: {
29+
user
30+
}
31+
});
3332
}
3433

3534
export function logout() {
36-
return async dispatch => {
35+
return async (dispatch) => {
3736
authService.logout();
3837
dispatch({
3938
type: LOGOUT
@@ -48,12 +47,10 @@ export function register() {
4847
export function updateProfile(update) {
4948
const request = axios.post('/api/account/profile', { update });
5049

51-
return dispatch => {
52-
request.then(response =>
53-
dispatch({
54-
type: UPDATE_PROFILE,
55-
payload: response.data
56-
})
57-
);
50+
return (dispatch) => {
51+
request.then((response) => dispatch({
52+
type: UPDATE_PROFILE,
53+
payload: response.data
54+
}));
5855
};
5956
}

src/components/Badge.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { useState, useEffect } from 'react';
22
import { makeStyles } from '@material-ui/styles';
3-
import { Card, Grid, Typography, Button } from '@material-ui/core';
3+
import {
4+
Card, Grid, Typography, Button
5+
} from '@material-ui/core';
46

57
const useStyles = makeStyles(() => ({
68
root: {
@@ -63,7 +65,7 @@ function Badge() {
6365
const [numberOfBadgesUnlocked, setNumberOFBadgeUnlocked] = useState(0);
6466

6567
useEffect(() => {
66-
//for demo purpose set to 6
68+
// for demo purpose set to 6
6769
setNumberOFBadgeUnlocked(6);
6870
}, []);
6971

@@ -75,7 +77,9 @@ function Badge() {
7577
Badges Earned
7678
</Typography>
7779
<Typography variant="h1" className={classes.topText}>
78-
{numberOfBadgesUnlocked} Unlocked
80+
{numberOfBadgesUnlocked}
81+
{' '}
82+
Unlocked
7983
</Typography>
8084
</Grid>
8185
</Grid>
@@ -86,31 +90,31 @@ function Badge() {
8690
src="./static/images/icons/star_yellow.svg"
8791
alt="badge"
8892
height="60px"
89-
></img>
93+
/>
9094
<Typography className={classes.badgesText}>Super Blogger</Typography>
9195
</Grid>
9296
<Grid item>
9397
<img
9498
src="./static/images/icons/star_orange.svg"
9599
alt="badge"
96100
height="60px"
97-
></img>
101+
/>
98102
<Typography className={classes.badgesText}>GitHub Hero</Typography>
99103
</Grid>
100104
<Grid item>
101105
<img
102106
src="./static/images/icons/star_blue.svg"
103107
alt="badge"
104108
height="60px"
105-
></img>
109+
/>
106110
<Typography className={classes.badgesText}>I am Famous</Typography>
107111
</Grid>
108112
<Grid item>
109113
<img
110114
src="./static/images/icons/star_yellow.svg"
111115
alt="badge"
112116
height="60px"
113-
></img>
117+
/>
114118
<Typography className={classes.badgesText}>Organizer</Typography>
115119
</Grid>
116120
</Grid>

src/components/Calendar.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function Calendar() {
191191
</div>
192192
</div>
193193
<Grid container className={classes.grid}>
194-
{daysName.map(day => (
194+
{daysName.map((day) => (
195195
<Grid item>
196196
<Typography
197197
display="inline"
@@ -205,7 +205,7 @@ function Calendar() {
205205
))}
206206
</Grid>
207207
<Grid container className={classes.grid}>
208-
{firstRow.map(date => (
208+
{firstRow.map((date) => (
209209
<Grid item>
210210
<Typography
211211
display="inline"
@@ -224,7 +224,7 @@ function Calendar() {
224224
))}
225225
</Grid>
226226
<Grid container className={classes.grid}>
227-
{secondRow.map(date => (
227+
{secondRow.map((date) => (
228228
<Grid item>
229229
<Typography
230230
display="inline"
@@ -240,7 +240,7 @@ function Calendar() {
240240
))}
241241
</Grid>
242242
<Grid container className={classes.grid}>
243-
{thirdRow.map(date => (
243+
{thirdRow.map((date) => (
244244
<Grid item>
245245
<Typography
246246
display="inline"
@@ -256,7 +256,7 @@ function Calendar() {
256256
))}
257257
</Grid>
258258
<Grid container className={classes.grid}>
259-
{fourthRow.map(date => (
259+
{fourthRow.map((date) => (
260260
<Grid item>
261261
<Typography
262262
display="inline"
@@ -272,7 +272,7 @@ function Calendar() {
272272
))}
273273
</Grid>
274274
<Grid container className={classes.grid}>
275-
{fifthRow.map(date => (
275+
{fifthRow.map((date) => (
276276
<Grid item>
277277
<Typography
278278
display="inline"

src/components/CommitChart.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { useState, useEffect } from 'react';
22
import { makeStyles } from '@material-ui/styles';
3-
import { Card, Grid, Typography, Paper } from '@material-ui/core';
3+
import {
4+
Card, Grid, Typography, Paper
5+
} from '@material-ui/core';
46
import { Chart, Bar } from 'react-chartjs-2';
57

68
Chart.defaults.global.legend.display = false;
@@ -101,9 +103,9 @@ function CommitChart() {
101103
const classes = useStyles();
102104
const now = new Date();
103105

104-
var days = [];
106+
const days = [];
105107

106-
for (var i = 29; i >= 0; i--) {
108+
for (let i = 29; i >= 0; i--) {
107109
const y = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(
108110
now - i * 86400000
109111
);

0 commit comments

Comments
 (0)