-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/delete nodes #21
base: feature/Pages
Are you sure you want to change the base?
Conversation
… deleteNodeWorks but connecting NodeFooter to global state, and then deleting the nodes data from the global state
…eactioncpacing, so i replaced it
src/app/Nav.js
Outdated
@@ -228,8 +228,8 @@ class Nav extends Component { | |||
name="pageTitle" | |||
fullWidth | |||
style={styles.textField} | |||
textareastyle={styles.textStyle} | |||
hinttext="Page Title" | |||
textareastyle={styles.textStyle} //I don't see this prop in the documentation |
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.
These comments aren't needed.
src/node/fragments/NodeFooter.js
Outdated
</Fragment> | ||
) | ||
} | ||
} from "../../store/actions" |
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.
Import from pages/PageActions. store/action will be deprecated, and will eventually be removed.
src/node/fragments/NodeFooter.js
Outdated
} | ||
|
||
// NOT SURE WHAT NEEDS TO BE SYNCED HERE |
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.
Comment isn't needed.
This function is mapping the current page in focus to the component's props, along with the scale of the scene.
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.
If you're not using scale or page in this component you can remove this function
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.
but mapState needs to exist in order for connect to work properly. What would i do instead?
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.
Pass null in its place instead. connect(null, { deleteAllLinks, deleteNode })(NodeFooter)
src/node/fragments/NodeFooter.js
Outdated
} | ||
|
||
// NOT SURE WHAT NEEDS TO BE SYNCED HERE |
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.
If you're not using scale or page in this component you can remove this function
src/node/fragments/NodeFooter.js
Outdated
//id: PropTypes.string.isRequired, | ||
setFocusedLink: PropTypes.func.isRequired, | ||
class NodeFooter extends Component | ||
{ |
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 having the brace dropped down goes against the convention throughout the rest of the app
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.
Just the spelling mistake and the dropped down brace I think need to be fixed
definitely needs review, i wasn't sure about the mapState function, what needed to be in the arguments, and what needed to be mapped. But it successfully deletes the odes from the state, and renders properly