Skip to content

Commit

Permalink
Include urlQueryString in context
Browse files Browse the repository at this point in the history
This makes it easier for users to append the query string to base URLs
provided by Times Square's API.
  • Loading branch information
jonathansick committed Apr 3, 2024
1 parent 789d876 commit 731af8b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export default function TimesSquareUrlParametersProvider({ children }) {
.map((item) => item)
);

const queryString = new URLSearchParams(userParameters).toString();

// pop display settings from the user parameters and to also separate out
// the notebook parameters.
const { ts_hide_code = '1', ...notebookParameters } = userParameters;
Expand All @@ -60,6 +62,7 @@ export default function TimesSquareUrlParametersProvider({ children }) {
commit,
tsSlug,
githubSlug,
urlQueryString: queryString,
}}
>
{children}
Expand Down

0 comments on commit 731af8b

Please sign in to comment.