Mao 4 ani în urmă
părinte
comite
0cf6f767c0

+ 1 - 1
packages/app/src/components/PageReactionButtons.tsx

@@ -30,7 +30,7 @@ const PageReactionButtons : FC<Props> = (props: Props) => {
     f();
   }, []);
 
-  const likeInvoked = () => {
+  const likeInvoked = async() => {
     setSumOfLikers(sumOflikers => (isLiked ? sumOflikers - 1 : sumOflikers + 1));
     setLikers(likerIds => (isLiked ? likerIds.filter(id => id !== currentUserId) : [...likerIds, currentUserId]));
     setIsLiked(isLiked => !isLiked);

+ 13 - 7
packages/app/src/components/SearchPage/SearchResultSubNavButton.tsx

@@ -8,21 +8,27 @@ import PageReactionButtons from '../PageReactionButtons';
 import PageManagement from '../Page/PageManagement';
 
 
-type Props = {
+type PageReactionButtonsProps = {
+  pageId: string,
+  currentUserId: string,
+}
+const PageReactionButtonsWrapper: FC<PageReactionButtonsProps> = (props: PageReactionButtonsProps) => {
+  return <PageReactionButtons {...props}></PageReactionButtons>;
+};
+
+
+type SearchResultSubNavButtonProps = {
   appContainer: AppContainer,
   isCompactMode: boolean,
 
   pageId: string,
 }
+const SearchResultSubNavButton: FC<SearchResultSubNavButtonProps> = (props: SearchResultSubNavButtonProps) => {
+  const { appContainer, isCompactMode, pageId } = props;
 
-const SearchResultSubNavButton : FC<Props> = (props: Props) => {
-  const {
-    appContainer, isCompactMode, pageId,
-  } = props;
-  const PageReactionButtonsTypeAny : any = PageReactionButtons;
   return (
     <>
-      <PageReactionButtonsTypeAny pageId={pageId} currentUserId={appContainer.currentUserId}></PageReactionButtonsTypeAny>
+      <PageReactionButtonsWrapper pageId={pageId} currentUserId={appContainer.currentUserId}></PageReactionButtonsWrapper>
       {/*
         TODO :
         once 80335 is done, merge 77543 branch(parent of 80335) into 77524.