Explorar o código

impl useCurrentPageYjsAwarenessStateSize

Shun Miyazawa %!s(int64=2) %!d(string=hai) anos
pai
achega
da6586ec55
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      apps/app/src/stores/page.tsx

+ 4 - 0
apps/app/src/stores/page.tsx

@@ -58,6 +58,10 @@ export const useCurrentPageYjsDraft = (initialData?: CurrentPageYjsDraft): SWRRe
   return useSWRStatic<CurrentPageYjsDraft, Error>('currentPageYjsDraft', initialData);
 };
 
+export const useCurrentPageYjsAwarenessStateSize = (initialData?: number): SWRResponse<number, Error> => {
+  return useSWRStatic<number, Error>('currentPageYjsAwarenessStateSize', initialData);
+};
+
 /** "useSWRxCurrentPage" is intended for initial data retrieval only. Use "useSWRMUTxCurrentPage" for revalidation */
 export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|null): SWRResponse<IPagePopulatedToShowRevision|null> => {
   const key = 'currentPage';