@theguild/components 8.0.0-alpha-20241128125739-2f2680e350f7112a00bb3a33aa3811950d0152fb → 8.0.0-alpha-20241128131301-d456edb69435ed4c8bf8e9b8970e040254a529f9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,9 @@ import { useState } from "react";
4
4
  import { cn } from "../cn";
5
5
  import { CallToAction } from "./call-to-action";
6
6
  function CookiesConsent(props) {
7
- const [consented, setConsented] = useState(() => localStorage.getItem("cookies") === "true");
7
+ const [consented, setConsented] = useState(() => {
8
+ return typeof localStorage === "undefined" ? false : localStorage.getItem("cookies") === "true";
9
+ });
8
10
  const onAccept = () => {
9
11
  setConsented(true);
10
12
  if (typeof localStorage !== "undefined") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/components",
3
- "version": "8.0.0-alpha-20241128125739-2f2680e350f7112a00bb3a33aa3811950d0152fb",
3
+ "version": "8.0.0-alpha-20241128131301-d456edb69435ed4c8bf8e9b8970e040254a529f9",
4
4
  "repository": {
5
5
  "url": "https://github.com/the-guild-org/docs",
6
6
  "directory": "packages/components"