tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
28
pulls
pipelines
don't call get_leaflet_data if no permission_token
awarm.space
10 months ago
7d06b477
406bf307
+5
-5
1 changed file
expand all
collapse all
unified
split
components
PageSWRDataProvider.tsx
+5
-5
components/PageSWRDataProvider.tsx
···
48
48
49
49
let useLeafletData = () => {
50
50
let { permission_token } = useReplicache();
51
51
-
return useSWR(
52
52
-
`${permission_token.id}-leaflet_data`,
53
53
-
async () =>
54
54
-
(await callRPC("get_leaflet_data", { token_id: permission_token.id }))
55
55
-
?.result,
51
51
+
return useSWR(`${permission_token.id}-leaflet_data`, async () =>
52
52
+
permission_token.id
53
53
+
? (await callRPC("get_leaflet_data", { token_id: permission_token.id }))
54
54
+
?.result
55
55
+
: undefined,
56
56
);
57
57
};
58
58
export function useLeafletPublicationData() {