Hi there, is there anyone who had the same issue? I cant set my buttons to true or false with this approach. setCookieConsent(false)}> Ablehnen
setCookieConsent(true)}> Erlauben Initially its set to null like in the tutorial. Now it tells me that its not possible to set it to true or false. Argument of type 'false' is not assignable to parameter of type 'SetStateAction'.ts(2345)
Honestly I was looking for this so long. Thanks for sharing.
First to make a tutorial about this properly..finally
haha yes, this was also my thought
@@MaxRohowsky was struggling with the cookie banner, not gonna lie... and nothing online.
Not first actually the same video as made by @Ryan Gaudion way earlier
Thank you! Finally a good tutorial on the subject. Earned a sub.
haha I share the frustration. There really wasnt any good video out there. :D
❤
But script is not updating from "denied" to "granted". did you checked it?
Like, subscribe!
Thanks for the sub!
I am not sure is good idea to embedded code without @next/third-parties/google . Your perfomance page can be low down.
Interesting... didn't think that would be an issue...
Hi there, is there anyone who had the same issue? I cant set my buttons to true or false with this approach.
setCookieConsent(false)}>
Ablehnen
setCookieConsent(true)}>
Erlauben
Initially its set to null like in the tutorial. Now it tells me that its not possible to set it to true or false.
Argument of type 'false' is not assignable to parameter of type 'SetStateAction'.ts(2345)
Hi Kai, this typescript error happens when you try to set a boolean value to something that only accepts null. Change the code to useState(null).