Skip to content
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

Enable Transactions page SSR #4753

Merged
merged 4 commits into from Aug 5, 2020
Merged

Enable Transactions page SSR #4753

merged 4 commits into from Aug 5, 2020

Conversation

kewitz
Copy link
Contributor

@kewitz kewitz commented Aug 4, 2020

@render
Copy link

render bot commented Aug 4, 2020

@kewitz kewitz requested a review from Betree August 4, 2020 17:45
@vercel
Copy link

vercel bot commented Aug 4, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/opencollective/opencollective-frontend/nrmh8yjio
✅ Preview: https://opencollective-frontend-git-feat-transactions-page-ssr.opencollective.vercel.app

Copy link
Member

@znarf znarf left a comment

Choose a reason for hiding this comment

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

Let's try to make the way props and variables are flowing clearer, renaming transactionsQuery will be a good first step. Interested to see @Betree feedback.

export default withUser(addCollectiveCoverData(TransactionsPage));
const addTransactionsData = graphql(transactionsQuery, {
skip: props => !props.slug,
name: 'transactionsQuery',
Copy link
Member

Choose a reason for hiding this comment

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

This is not a good name, it's confusing.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that it creates confusion with the query itself, something like transactionsQueryResult would make more sense to me.

Copy link
Contributor Author

@kewitz kewitz Aug 5, 2020

Choose a reason for hiding this comment

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

I renamed it to transactionsData.

Copy link
Member

Choose a reason for hiding this comment

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

Looks better!

Copy link
Member

@Betree Betree left a comment

Choose a reason for hiding this comment

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

I like that we're moving the query to the page, I think it's more suited there. In the same idea, having the pushRoute in the page would make this component usable on other pages if ever needed.

Beside the variable name mentioned above, the rest looks good to me!

@@ -106,4 +213,15 @@ class TransactionsPage extends React.Component {
}
}

export default withUser(addCollectiveCoverData(TransactionsPage));
const addTransactionsData = graphql(transactionsQuery, {
skip: props => !props.slug,
Copy link
Member

Choose a reason for hiding this comment

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

collectiveSlug is required in

.add('transactions', '/:parentCollectiveSlug?/:collectiveType(events|projects)?/:collectiveSlug/transactions')
. Is this check still necessary?

@kewitz kewitz merged commit f2ae84f into master Aug 5, 2020
@kewitz kewitz deleted the feat/transactions-page-ssr branch August 5, 2020 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants