Skip to content

Commit

Permalink
Add debug console logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansick committed Mar 27, 2024
1 parent 136fbdf commit dd52be1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function TimesSquareParametersProvider({ children }) {

// Get components out of the URL path
const { tsSlug, owner = '', repo = '', commit = '' } = router.query;
console.log('tsSlug: ', tsSlug);

// Since the page's path is a [...tsSlug], we need to join the parts of the
// path to get the full slug. This combines the owner, repo, directory, and
Expand All @@ -31,6 +32,7 @@ export default function TimesSquareParametersProvider({ children }) {
const tsPageUrl = router.pathname.startsWith('/times-square/github-pr')
? `${timesSquareUrl}/v1/github-pr/${owner}/${repo}/${commit}/${githubSlug}`
: `${timesSquareUrl}/v1/github/${githubSlug}`;
console.log('tsPageUrl: ', tsPageUrl);

// Get the user query parameters from the URL. In next 13 we can use the
// useSearchParams hook (https://nextjs.org/docs/app/api-reference/functions/use-search-params)
Expand All @@ -49,6 +51,9 @@ export default function TimesSquareParametersProvider({ children }) {
const { ts_hide_code = '1', ...notebookParameters } = userParameters;
const displaySettings = { ts_hide_code };

console.log('displaySettings: ', displaySettings);
console.log('notebookParameters: ', notebookParameters);

return (
<TimesSquareParametersContext.Provider
value={{ tsPageUrl, displaySettings, notebookParameters }}
Expand Down

0 comments on commit dd52be1

Please sign in to comment.