-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update: Refactor useAddedBy to use authorText and originalSource fields. #56568
Conversation
344873e
to
a94c818
Compare
Size Change: -96 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
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.
Looks good, thank you!
].includes( template.source ) ) ) | ||
) { | ||
switch ( originalSource ) { | ||
case 'theme': { | ||
return { | ||
type: 'theme', |
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.
Nit: we could use the originalSource
in the return objects in type
prop.
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.
Updated 👍
2c01a8b
to
fd6cfa3
Compare
fd6cfa3
to
f71971b
Compare
Refactor useAddedBy to use authorText and originalSource fields from the REST API, simplifying the logic of the hook.