pixelize-design-library 2.4.1-beta.12 → 2.4.1-beta.13
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreferences.d.ts","sourceRoot":"","sources":["../../src/Hooks/usePreferences.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAqBF,QAAA,MAAM,iBAAiB,GAAI,iDAOxB,gBAAgB,KAAG;IACpB,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"usePreferences.d.ts","sourceRoot":"","sources":["../../src/Hooks/usePreferences.ts"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAqBF,QAAA,MAAM,iBAAiB,GAAI,iDAOxB,gBAAgB,KAAG;IACpB,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;CA6BlB,CAAC;AAEF,QAAA,MAAM,kBAAkB,GAAI,iDAOzB,gBAAgB;6BAI0B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;sCAmBzD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;CAMjC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -21,7 +21,12 @@ const constructUrl = ({ baseUrl, key, page, name, orgId }) => {
|
|
|
21
21
|
};
|
|
22
22
|
const useGetPreferences = ({ baseUrl = "", key = "", page = "", name = "", authToken = "", orgId = "", }) => {
|
|
23
23
|
const [preferences, setPreferences] = (0, react_1.useState)([]);
|
|
24
|
-
|
|
24
|
+
// Must start true (not false) whenever a fetch is about to happen: this is
|
|
25
|
+
// read by consumers (KanbanBoard's preferences-hydration effect) on their
|
|
26
|
+
// very first render, before this hook's own mount effect has run. Starting
|
|
27
|
+
// false let that first render look like "nothing loading, nothing saved",
|
|
28
|
+
// which permanently skipped hydration once the real data arrived.
|
|
29
|
+
const [loading, setLoading] = (0, react_1.useState)(() => Boolean(baseUrl));
|
|
25
30
|
(0, react_1.useEffect)(() => {
|
|
26
31
|
if (!baseUrl) {
|
|
27
32
|
return;
|
|
@@ -18,7 +18,12 @@ const constructUrl = ({ baseUrl, key, page, name, orgId }) => {
|
|
|
18
18
|
};
|
|
19
19
|
const useGetPreferences = ({ baseUrl = "", key = "", page = "", name = "", authToken = "", orgId = "", }) => {
|
|
20
20
|
const [preferences, setPreferences] = useState([]);
|
|
21
|
-
|
|
21
|
+
// Must start true (not false) whenever a fetch is about to happen: this is
|
|
22
|
+
// read by consumers (KanbanBoard's preferences-hydration effect) on their
|
|
23
|
+
// very first render, before this hook's own mount effect has run. Starting
|
|
24
|
+
// false let that first render look like "nothing loading, nothing saved",
|
|
25
|
+
// which permanently skipped hydration once the real data arrived.
|
|
26
|
+
const [loading, setLoading] = useState(() => Boolean(baseUrl));
|
|
22
27
|
useEffect(() => {
|
|
23
28
|
if (!baseUrl) {
|
|
24
29
|
return;
|