skip to Main Content

Is it too late to read the page URL with Reactjs and Nextjs?

I would like to dynamically render a script in next.js depending on the page url. My code in page/app.tsx <Head> <script id="script" src="www.cookie.com" data-cbid={typeof window !== 'undefined' && window.location.href.includes('localhost') ? "XXXXXXXXX" : "YYYYYYYYYY"} data-blockingmode="auto" type="text/javascript" async> </script> <Head> However, my…

VIEW QUESTION

Can AWS Amplify UI React get AWS Cognito tokens?

Im currently working in a Next.js frontend and NestJS backend application and im setting the login component with the @aws-amplify/ui-react: like in the documentation https://docs.amplify.aws/lib/auth/getting-started/q/platform/js/#option-1-use-pre-built-ui-components import { Amplify } from 'aws-amplify'; import { withAuthenticator } from '@aws-amplify/ui-react'; import '@aws-amplify/ui-react/styles.css'; import…

VIEW QUESTION
Back To Top
Search