-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: bookmark organizations #94
base: master
Are you sure you want to change the base?
Conversation
6cf000e
to
d1020ba
Compare
d1020ba
to
da44e13
Compare
|
@nishantwrp @singlamohit1 your views? |
@singlamohit1 are you still working on this? Please address my comments. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should an option to bookmark an organization in it's info page too.
For design, I think we can do the same thing, we did in the Organizations List Page.
Your views @nishantwrp @singlamohit1 ?
After an offline discussion with @nishantwrp, got to know that this was already discussed. Please ignore. |
b254bb8
to
5a7f8b8
Compare
|
||
const getIfOrgSaved = orgname => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to getIsOrgBookmarked
?
const OrgCard = ({ data }) => { | ||
const [ifOrgNotSaved, setIfOrgSaved] = useState( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to [isOrgBookmarked, setIsOrgBookmarked]
?
@@ -20,6 +36,13 @@ const OrgCard = ({ data }) => { | |||
}) | |||
.reverse() | |||
|
|||
const addOrRemoveBookmark = value => { | |||
let isPresent = getIfOrgSaved(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to isBookmarked
?
@@ -20,6 +36,13 @@ const OrgCard = ({ data }) => { | |||
}) | |||
.reverse() | |||
|
|||
const addOrRemoveBookmark = value => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to toggleBookmark
?
localStorage.setItem("gsoc_orgs", JSON.stringify(curr_orgs)) | ||
} | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} | |
return | ||
} | ||
|
||
export function removeOrgToShortlist(orgname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to removeOrgFromBookmarks
?
@@ -0,0 +1,72 @@ | |||
import { createSlice } from "@reduxjs/toolkit" | |||
|
|||
export function addOrgToShortlist(orgname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to addOrgToBookmarks
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some variable name changes. Rest LGTM.
@nishantwrp Can you pls review the PR. It has been months now. I want to work on more features once this gets live. |
@beingnoble03 Can you review the PR since Nishant seems busy |
@singlamohit1 you didn't accept the requested changes. |
@nishantwrp please review. |
@nishantwrp @singlamohit1 do you think we can have the bookmark feat? :) |
yes |
Fixes #85