Skip to content

Commit

Permalink
Added icons and improved the post functionality (#348)
Browse files Browse the repository at this point in the history
* Created grid layout for news section

Event and Project Details Card added to news feed

Refactored code for better readability

* Fix netlify react-router issue

* hotfix for auth login

* Added icons and improved the post functionality
  • Loading branch information
rak-shit authored Mar 3, 2020
1 parent 242f312 commit ba6630c
Show file tree
Hide file tree
Showing 18 changed files with 858 additions and 133 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

echo "/* /index.html 200" >> ./build/_redirects
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "react-scripts build && ./build.sh",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
5 changes: 5 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
src: local('Inter'), url(./fonts/Inter-Regular.otf) format('opentype');
}

@font-face {
font-family: 'Qanelas';
src: local('Qanelas'), url(./fonts/Qanelas-Regular.ttf) format('truetype');
}

.App {
text-align: center;
}
Expand Down
2 changes: 1 addition & 1 deletion src/auth/auth-service.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from "axios";

export const loginIn = body => {
return axios.post("http://donut-api-prod.codeuino.org/auth/login", {
return axios.post("https://donut-backend-prod.herokuapp.com/auth/login", {
email: body.email,
password: body.password
});
Expand Down
Binary file added src/fonts/Qanelas-Regular.ttf
Binary file not shown.
88 changes: 88 additions & 0 deletions src/jsonData/news-feed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import profileImg from '../svgs/evt-creator.svg';
import eventImg from "../svgs/event-img-1.svg";
import eventImg2 from "../svgs/event-img-2.svg";

const newsFeed = [
{
_id: 1,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 810,
downVotes: 185,
eventImage: null,
type: 'Donut'
},
{
_id: 2,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 80,
downVotes: 15,
eventImage: eventImg2,
type: 'Project',
projectName: 'Some Huge Project Name',
projectOwner: 'Neilson'
},
{
_id: 3,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 104,
downVotes: 25,
eventImage: null,
type: 'Donut'
},
{
_id: 4,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 810,
downVotes: 185,
eventImage: null,
type: 'Donut'
},
{
_id: 5,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
eventName: 'Christmas Party',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 80,
downVotes: 15,
eventImage: eventImg,
type: 'Event'
},
{
_id: 6,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 80,
downVotes: 15,
eventImage: null,
type: 'Donut'
},
{
_id: 7,
imgSrc: profileImg,
createdBy: 'Marjorie Alexander',
created: 'June 5, 2018 4:31 AM',
details: 'ex sit ex laboris adipisicing enim eiusmod proident exercitation ea fugiat in mollit pariatur occaecat ut nostrud ullamco ex official',
upvotes: 810,
downVotes: 185,
eventImage: null,
type: 'Donut'
},
]

export default newsFeed;
36 changes: 36 additions & 0 deletions src/jsonData/notifications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import donutIcon from '../svgs/donut-icon.svg'
import icon2 from '../svgs/not-icon-2.svg'
import icon3 from '../svgs/not-icon-3.svg'

const customNotifications = [
{
_id: 1,
imgSrc: donutIcon,
heading: 'Cody Nguyen',
content: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: '+1 RSVP'
},
{
_id: 2,
imgSrc: icon2,
heading: 'Arlene Mccoy',
content: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
},
{
_id: 3,
imgSrc: icon3,
heading: 'Julian Richards',
content: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: 'View'
},
{
_id: 4,
imgSrc: donutIcon,
heading: 'Julian Richards',
content: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
},
]

export default customNotifications;
48 changes: 48 additions & 0 deletions src/jsonData/upcoming-events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import profileImg from '../svgs/profile-icon.svg';

const events = [
{
_id: 1,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: '+1 RSVP'
},
{
_id: 2,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
},
{
_id: 3,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: '+1 RSVP'
},
{
_id: 4,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
},
{
_id: 5,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
},
{
_id: 6,
imgSrc: profileImg,
createdBy: 'Julian Richards',
description: 'Lorem ipsum dolor sit amet, duo esse augue torgatos te, ius an nisi deterruisset.',
tag: ''
}
]

export default events;
3 changes: 3 additions & 0 deletions src/svgs/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/svgs/down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/svgs/event-img-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/svgs/event-img-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/svgs/evt-creator.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/svgs/up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ba6630c

Please sign in to comment.