Skip to content

Commit 5efecb2

Browse files
committed
fixing inconsistencies
1 parent 7d8ea62 commit 5efecb2

File tree

35 files changed

+388
-236
lines changed

35 files changed

+388
-236
lines changed

src/actions/usersAction.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ export const getPostsCreatedByUser = (pagination = 10, page = 1) => async (dispa
160160
}
161161

162162
// GET INVITE LINK
163-
export const getInviteLink = () => async (dispatch) => {
163+
export const getInviteLink = (role) => async (dispatch) => {
164164
try {
165-
const res = await axios.get('/user/invite')
165+
const res = await axios.get(`/user/invite?role=${role}`)
166166
dispatch(setRequestStatus(false));
167167
if(res.status === 200) {
168168
dispatch(setRequestStatus(true));
@@ -187,7 +187,7 @@ export const processInviteToken = (token) => async (dispatch) => {
187187
console.log('Processing the invite link ', res.data);
188188
dispatch({
189189
type: PROCESS_INVITE_LINK,
190-
payload: res.data.success || res.data.msg
190+
payload: res.data.redirectTo || res.data.msg
191191
})
192192
}
193193
} catch(error) {

src/auth/login-form/login-form.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
justify-content: center;
1212
margin-top: 30px;
1313
button {
14-
padding: 8px 10px;
15-
border-radius: 30px;
14+
// padding: 8px 10px;
15+
width: 104px;
16+
// border-radius: 30px;
1617
}
1718
}
1819
}
@@ -30,7 +31,7 @@
3031

3132
.loginbtn {
3233
border: 1px solid rgb(211, 220, 228);
33-
border-radius: 3px;
34+
// border-radius: 3px;
3435
width: 45%;
3536
}
3637

src/auth/signup-form/signup-form.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
justify-content: center;
1212
margin-top: 30px;
1313
button {
14-
padding: 8px 10px;
15-
border-radius: 30px;
14+
// padding: 8px 10px;
15+
width: 104px;
16+
// border-radius: 30px;
1617
}
1718
}
1819
.savebtn {

src/css/components/_modals.scss

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,17 +347,17 @@
347347
.modal__save {
348348
background: $color-modal-button-active;
349349
box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
350-
border-radius: 34px;
351-
width: 104px;
352-
height: 42px;
350+
// border-radius: 34px;
351+
width: 80px;
352+
height: 38.5px;
353353
margin-right: 20px;
354354
margin-bottom: 10px;
355355
margin-left: 14px;
356356
.modal__buttontext {
357357
font-family: $font-family-Inter;
358358
font-style: normal;
359359
font-weight: bold;
360-
font-size: 18px;
360+
font-size: 14px;
361361
line-height: 22px;
362362
/* identical to box height */
363363

@@ -368,17 +368,16 @@
368368
border: 1px solid #1a73e8;
369369
background: $color-modal-button-inactive;
370370
box-sizing: border-box;
371-
box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.1);
372-
border-radius: 34px;
371+
// border-radius: 34px;
373372
margin-right: 20px;
374373
margin-bottom: 10px;
375-
width: 104px;
376-
height: 42px;
374+
width: 80px;
375+
height: 38.5px;
377376
.modal__buttontext {
378377
font-family: $font-family-Inter;
379378
font-style: normal;
380379
font-weight: $font-weight-normal;
381-
font-size: 18px;
380+
font-size: 14px;
382381
line-height: 22px;
383382
/* identical to box height */
384383
color: #1a73e8;

src/user/dashboard/dashboard.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class Dashboard extends Component {
7777
</div>
7878
<div className="promotions">
7979
{this.state.isLoading ? portfolioLoading() : <Portfolio />}
80-
{/* {this.state.isLoading ? orgUpdatesLoading() : <Updates></Updates>} */}
8180
</div>
8281
</div>
8382
);

src/user/dashboard/dashboard.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
flex-grow: 4;
1212
.notify-user {
1313
display: flex;
14-
padding: 20px 0px 20px 30px;
14+
padding: 20px 10px 20px 30px;
1515
}
1616
}
1717
.promotions {
18+
height: 256px;
19+
flex-direction: row;
1820
flex-grow: 2;
1921
padding: 20px 12px 20px 0px;
2022
}

src/user/dashboard/navigation/navigation.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ class Navigation extends Component {
2222
org: false
2323
};
2424
render() {
25-
// function renderTooltip(props) {
26-
// return (
27-
// <Tooltip id="button-tooltip" {...props}>
28-
// Simple tooltip
29-
// </Tooltip>
30-
// );
31-
// }
3225
const ListItem = (props) => {
3326
const item = props.isMobile ? (
3427
<ListGroup.Item className={props.className}>

src/user/dashboard/news-feed/news-feed.js

Lines changed: 8 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ import { Button } from "react-bootstrap";
1818
import AddEventModal from "./popups/AddEventModal";
1919
import AddProjectModal from "./popups/AddProjectModal";
2020
import ArrowDropUpIcon from "@material-ui/icons/ArrowDropUp";
21-
// import ArrowDropDownIcon from "@material-ui/icons/ArrowDropDown";
2221
import ChatBubbleIcon from "@material-ui/icons/ChatBubble";
23-
// import EventNoteIcon from "@material-ui/icons/EventNote";
24-
// import EventIcon from "@material-ui/icons/Event";
25-
// import ReplyIcon from '@material-ui/icons/Reply';
26-
// import feed from "../../../jsonData/news-feed";
2722
import "../../pinned-posts/posts/posts.scss";
2823
import "./news-feed.scss";
2924
import AddPostModal from "./popups/AddPostModal";
@@ -40,11 +35,14 @@ const styles = makeStyles((theme) => ({
4035
minWidth: "50%",
4136
},
4237
listStyle: {
43-
paddingBottom: 0,
38+
background: "#ffffff",
39+
border: "1px solid #cccccc",
40+
boxShadow: "1px 2px 5px rgba(0, 0, 0, 0.1)",
41+
borderRadius: "5px"
4442
},
4543
listStyle2: {
4644
paddingTop: 0,
47-
marginTop: "-4px",
45+
marginTop: "-4px"
4846
},
4947
info: {
5048
position: "absolute",
@@ -98,19 +96,15 @@ function NewsFeed(props) {
9896
const [writePost, showPostModal] = useState(false);
9997
const [showComment, toggle] = useState(false);
10098
const [commentId, setCommentId] = useState('');
101-
// const [all, setAll] = useState([]);
10299
const [events, setEvents] = useState([]);
103100
const [projects, setAllProjects] = useState([]);
104101
const [posts, setAllPosts] = useState([]);
105-
// const [allCommentsOfPost, setAllCommentsOfPost] = useState({})
106102

107103
useEffect(() => {
108104
console.log("useEffect from news-feed ", props);
109105
setEvents(props?.allEvents);
110106
setAllProjects(props?.allProjects);
111107
setAllPosts(props?.allPosts);
112-
// setAll(props?.allMix);
113-
// setAllCommentsOfPost(props?.comment?.allComments)
114108
}, [props]);
115109

116110
let handleClick = (atrb) => () => {
@@ -154,9 +148,6 @@ function NewsFeed(props) {
154148
<div className="grid" key={post._id}>
155149
<Paper elevation={1} className={classes.paper}>
156150
<Card className={classes.root}>
157-
{/* <CardMedia className="projimg"
158-
image={post?.image || eventImg } title="Post Image">
159-
</CardMedia> */}
160151
<List className={classes.listStyle}>
161152
<ListItem className={classes.listStyle2}>
162153
<ListItemAvatar>
@@ -168,20 +159,6 @@ function NewsFeed(props) {
168159
<h2>{post?.userId?.name?.firstName + " " + post?.userId?.name?.lastName}</h2>
169160
<small>{post?.createdAt}</small>
170161
</ListItemText>
171-
{/* <ListItemSecondaryAction>
172-
{post.note === true ? (
173-
<IconButton edge="end" className={classes.icon}>
174-
<EventNoteIcon className={classes.event} />
175-
</IconButton>
176-
) : post.schedule === true ? (
177-
<IconButton edge="end" className={classes.icon}>
178-
<EventIcon className={classes.event} />
179-
</IconButton>
180-
) : null}
181-
<IconButton edge="end" className={classes.icon}>
182-
<MoreHorizIcon className={classes.horiz} />
183-
</IconButton>
184-
</ListItemSecondaryAction> */}
185162
</ListItem>
186163
<div className="post-details2">{post?.content}</div>
187164
<ListItem>
@@ -235,36 +212,16 @@ function NewsFeed(props) {
235212
<h2>{project?.createdBy?.name?.firstName + " " + project?.createdBy?.name?.lastName}</h2>
236213
<small>{project?.createdAt}</small>
237214
</ListItemText>
238-
{/* <ListItemSecondaryAction>
239-
{ (project?.note === true) ?
240-
<IconButton edge="end" className={classes.icon}>
241-
<EventNoteIcon className={classes.event}/>
242-
</IconButton> : (project.schedule === true) ?
243-
<IconButton edge="end" className={classes.icon}>
244-
<EventIcon className={classes.event}/>
245-
</IconButton> : null }
246-
<IconButton edge="end" className={classes.icon}>
247-
<MoreHorizIcon className={classes.horiz}/>
248-
</IconButton>
249-
</ListItemSecondaryAction> */}
250215
</ListItem>
251216
<div className="post-details2">{project?.description?.short}</div>
252217
<ListItem>
253-
{/* <IconButton className={classes.vote}>
254-
<ArrowDropUpIcon className="up-vote"/>
255-
</IconButton>
256-
<span className="up-vote"> {project.upvotes}</span>
257-
<span className="space"></span>
258-
<IconButton className={classes.vote}>
259-
<ArrowDropDownIcon className="down-vote"/>
260-
</IconButton>
261-
<span className="down-vote">{project.downVotes}</span> */}
262218
<span className="com-btn">
263219
<ChatBubbleIcon className={classes.chat}/>
264220
<Button
265-
onClick = {
221+
className = "comment-btn"
222+
onClick = {
266223
commentToggle.bind(this, project._id)
267-
} >
224+
} >
268225
<span className="comment">Comment</span>
269226
</Button>
270227
</span>
@@ -317,40 +274,8 @@ function NewsFeed(props) {
317274
<h2>{event?.createdBy?.name?.firstName + " " + event?.createdBy?.name?.lastName}</h2>
318275
<small>{event?.createdAt}</small>
319276
</ListItemText>
320-
{/* <ListItemSecondaryAction>
321-
{ (event.note === true) ?
322-
<IconButton edge="end" className={classes.icon}>
323-
<EventNoteIcon className={classes.event}/>
324-
</IconButton> : (event.schedule === true) ?
325-
<IconButton edge="end" className={classes.icon}>
326-
<EventIcon className={classes.event}/>
327-
</IconButton> : null }
328-
<IconButton edge="end" className={classes.icon}>
329-
<MoreHorizIcon className={classes.horiz}/>
330-
</IconButton>
331-
</ListItemSecondaryAction> */}
332277
</ListItem>
333278
<div className="post-details2">{event?.description?.shortDescription}</div>
334-
{/* <ListItem>
335-
<IconButton className={classes.vote}>
336-
<ArrowDropUpIcon className="up-vote"/>
337-
</IconButton>
338-
<span className="up-vote">{event.upvotes}</span>
339-
<span className="space"></span>
340-
<IconButton className={classes.vote}>
341-
<ArrowDropDownIcon className="down-vote"/>
342-
</IconButton>
343-
<span className="down-vote">{event.downVotes}</span>
344-
<span className="com-btn">
345-
<ChatBubbleIcon className={classes.chat}/>
346-
<Button
347-
onClick = {
348-
commentToggle.bind(this, event._id)
349-
} >
350-
<span className="comment">Comment</span>
351-
</Button>
352-
</span>
353-
</ListItem> */}
354279
</List>
355280
</Card>
356281
</Paper>

src/user/dashboard/news-feed/news-feed.scss

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
border-right: 1px solid rgba(204, 204, 204, 0.7);
8282
.date-content {
8383
width: 50%;
84-
margin: 0 auto;
84+
padding: 1vw;
8585
small {
8686
font-family: Inter;
8787
font-style: normal;
@@ -367,8 +367,16 @@
367367
color: #ff0000;
368368
}
369369
.news__feed__container {
370+
.news-feed {
371+
.post-article{
372+
.article {
373+
margin-left: auto;
374+
margin-right: auto;
375+
}
376+
}
377+
}
370378
.post {
371-
width: 130%;
379+
width: 140%;
372380
margin-bottom: 17px;
373381
}
374382
}
@@ -393,14 +401,13 @@
393401

394402
.optionbtn {
395403
background: #1a73e8;
396-
border-radius: 100px;
404+
// border-radius: 100px;
397405
.optionbtn-text {
398406
font-family: Inter;
399407
font-style: normal;
400408
font-weight: 600;
401409
font-size: 16px;
402410
line-height: 19px;
403-
404411
color: #ffffff;
405412
}
406413
}
@@ -457,3 +464,15 @@
457464
display: none;
458465
}
459466
}
467+
.post {
468+
.grid {
469+
.com-btn {
470+
.btn-primary {
471+
background-color: #ffffff;
472+
border-radius: 0px;
473+
border: 0px;
474+
margin-bottom: 6px;
475+
}
476+
}
477+
}
478+
}

0 commit comments

Comments
 (0)