Skip to content

Commit

Permalink
Add a new getProductFeedUrl function to utils/urls.js
Browse files Browse the repository at this point in the history
  • Loading branch information
eason9487 committed Aug 8, 2022
1 parent cf5a18e commit ab1c7eb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/src/utils/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ export const getDashboardUrl = () => {
return getNewPath( null, dashboardPath, null );
};

/**
* Return product feed URL with query parameters.
*
* @param {Object} [query=null] object of params to be updated.
* @return {string} Product feed URL with specified query parameters.
*/
export const getProductFeedUrl = ( query = null ) => {
return getNewPath( query, pagePaths.productFeed, null );
};

export const getSettingsUrl = () => {
return getNewPath( null, settingsPath, null );
};
Expand Down

0 comments on commit ab1c7eb

Please sign in to comment.