a tool for shared writing and social publishing

don't revalidate unless needed for some hook

+11 -1
+5 -1
app/(home-pages)/home/HomeLayout.tsx
··· 137 return { ...result, titles }; 138 } 139 }, 140 - { fallbackData: { facts: props.initialFacts, titles: props.titles } }, 141 ); 142 143 let { data: localLeaflets } = useSWR("leaflets", () => getHomeDocs(), {
··· 137 return { ...result, titles }; 138 } 139 }, 140 + { 141 + fallbackData: { facts: props.initialFacts, titles: props.titles }, 142 + revalidateOnFocus: false, 143 + revalidateOnReconnect: false, 144 + }, 145 ); 146 147 let { data: localLeaflets } = useSWR("leaflets", () => getHomeDocs(), {
+2
app/(home-pages)/reader/GlobalContent.tsx
··· 22 }, 23 { 24 fallbackData: { posts: initialData.posts }, 25 }, 26 ); 27
··· 22 }, 23 { 24 fallbackData: { posts: initialData.posts }, 25 + revalidateOnFocus: false, 26 + revalidateOnReconnect: false, 27 }, 28 ); 29
+4
components/IdentityProvider.tsx
··· 34 }) { 35 let { data: identity, mutate } = useSWR("identity", () => getIdentityData(), { 36 fallbackData: props.initialValue, 37 }); 38 useEffect(() => { 39 mutate(props.initialValue);
··· 34 }) { 35 let { data: identity, mutate } = useSWR("identity", () => getIdentityData(), { 36 fallbackData: props.initialValue, 37 + revalidateOnFocus: false, 38 + revalidateOnReconnect: false, 39 + revalidateIfStale: false, 40 + revalidateOnMount: false, 41 }); 42 useEffect(() => { 43 mutate(props.initialValue);