Ver Fonte

impl useCurrentPageYjsAwarenessStateSize

Shun Miyazawa há 1 ano atrás
pai
commit
da6586ec55
1 ficheiros alterados com 4 adições e 0 exclusões
  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);
   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 */
 /** "useSWRxCurrentPage" is intended for initial data retrieval only. Use "useSWRMUTxCurrentPage" for revalidation */
 export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|null): SWRResponse<IPagePopulatedToShowRevision|null> => {
 export const useSWRxCurrentPage = (initialData?: IPagePopulatedToShowRevision|null): SWRResponse<IPagePopulatedToShowRevision|null> => {
   const key = 'currentPage';
   const key = 'currentPage';