@flowselections/pick-schermen-kwekers 1.0.87 → 1.0.89
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":"PickPublicPage.d.ts","sourceRoot":"","sources":["../../src/components/PickPublicPage.tsx"],"names":[],"mappings":"AAQA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,+
|
|
1
|
+
{"version":3,"file":"PickPublicPage.d.ts","sourceRoot":"","sources":["../../src/components/PickPublicPage.tsx"],"names":[],"mappings":"AAQA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,+BA8E7C"}
|
|
@@ -32,6 +32,18 @@ export function PickPublicPage({ slug }) {
|
|
|
32
32
|
queryFn: () => pickApi.stationBySlug(slug),
|
|
33
33
|
enabled: keyRead,
|
|
34
34
|
});
|
|
35
|
+
const stationName = typeof station?.name === "string" && station.name.trim() ? station.name.trim() : null;
|
|
36
|
+
// Tabbladtitel = schermnaam. Vorige en eigen titel per effect-run vastleggen (geen gedeelde ref),
|
|
37
|
+
// en alleen terugzetten als niemand anders de titel inmiddels heeft gewijzigd.
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const previous = document.title;
|
|
40
|
+
const own = stationName ?? "Pickstation";
|
|
41
|
+
document.title = own;
|
|
42
|
+
return () => {
|
|
43
|
+
if (document.title === own)
|
|
44
|
+
document.title = previous;
|
|
45
|
+
};
|
|
46
|
+
}, [stationName]);
|
|
35
47
|
if (isLoading || !keyRead || statusLoading) {
|
|
36
48
|
return (_jsx("div", { className: "flex min-h-screen items-center justify-center bg-background", children: _jsx(Loader2, { className: "h-8 w-8 animate-spin text-primary" }) }));
|
|
37
49
|
}
|