Yuki Takei 7 месяцев назад
Родитель
Сommit
5f399d018c

+ 1 - 1
apps/app/src/client/components/Me/ProfileImageSettings.tsx

@@ -17,7 +17,7 @@ const DEFAULT_IMAGE = '/images/icons/user.svg';
 const ProfileImageSettings = (): JSX.Element => {
   const { t } = useTranslation();
 
-  const [currentUser] = useCurrentUser();
+  const currentUser = useCurrentUser();
 
   const [isGravatarEnabled, setGravatarEnabled] = useState(currentUser?.isGravatarEnabled);
   const [uploadedPictureSrc, setUploadedPictureSrc] = useState(() => {

+ 1 - 1
apps/app/src/client/components/PrivateLegacyPages.tsx

@@ -194,7 +194,7 @@ ConvertByPathModal.displayName = 'ConvertByPathModal';
 const PrivateLegacyPages = (): JSX.Element => {
   const { t } = useTranslation();
 
-  const [isAdmin] = useIsAdmin();
+  const isAdmin = useIsAdmin();
 
   const [keyword, setKeyword] = useState<string>(initQ);
   const [offset, setOffset] = useState<number>(0);

+ 2 - 2
apps/app/src/components/PageView/PageAlerts/FixPageGrantAlert.tsx

@@ -284,8 +284,8 @@ const FixPageGrantModal = (props: ModalProps): JSX.Element => {
 export const FixPageGrantAlert = (): JSX.Element => {
   const { t } = useTranslation();
 
-  const [currentUser] = useCurrentUser();
-  const [pageData] = useCurrentPageData();
+  const currentUser = useCurrentUser();
+  const pageData = useCurrentPageData();
   const hasParent = pageData != null ? pageData.parent != null : false;
   const pageId = pageData?._id;