Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

SWC-5612 - Use SynapseContextProvider so SRC components receive token via context #615

Merged
merged 5 commits into from
Jun 4, 2021

Conversation

nickgros
Copy link
Contributor

@nickgros nickgros commented May 21, 2021

Depends on Sage-Bionetworks/Synapse-React-Client#1047

Will need an update to SRC to get those changes

@@ -145,7 +143,14 @@ class AppInitializer extends React.Component<Props, AppInitializerState> {
return <></>
}
return (
<TokenContext.Provider value={this.state.token}>
<SynapseWrapper
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the magic happens

Comment on lines +84 to +85
token: ctx?.accessToken,
accessToken: ctx?.accessToken,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some components (in both SRC and portals) still take token or accessToken as a prop, so we cannot remove this yet.

@nickgros nickgros changed the title Use SynapseWrapper so SRC components receive token via context SWC-5612 - Use SynapseContextProvider so SRC components receive token via context Jun 1, 2021
@dpulls
Copy link

dpulls bot commented Jun 2, 2021

🎉 All dependencies have been resolved !

@nickgros nickgros marked this pull request as ready for review June 3, 2021 20:34
@nickgros nickgros merged commit e09f949 into Sage-Bionetworks:master Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants