jam411 3 лет назад
Родитель
Сommit
af5a0fd3fb

+ 3 - 2
packages/app/src/components/ContentLinkButtons.tsx

@@ -1,10 +1,11 @@
 import React, { useCallback } from 'react';
 
 import { smoothScrollIntoView } from '~/client/util/smooth-scroll';
-import styles from '~/components/ContentLinkButtons.module.scss';
 import { RecentlyCreatedIcon } from '~/components/Icons/RecentlyCreatedIcon';
 import { usePageUser } from '~/stores/context';
 
+import styles from './ContentLinkButtons.module.scss';
+
 const WIKI_HEADER_LINK = 120;
 
 const BookMarkLinkButton = React.memo(() => {
@@ -55,7 +56,7 @@ export const ContentLinkButtons = (): JSX.Element => {
 
   const { data: pageUser } = usePageUser();
 
-  if (pageUser == null || pageUser.name === '') {
+  if (pageUser == null || pageUser.status === 4) {
     return <></>;
   }
 

+ 1 - 2
packages/app/src/components/User/UserInfo.tsx

@@ -10,8 +10,7 @@ export const UserInfo = (): JSX.Element => {
 
   const { data: pageUser } = usePageUser();
 
-  // Do not display when the user does not exist
-  if (pageUser == null || pageUser.name === '') {
+  if (pageUser == null || pageUser.status === 4) {
     return <></>;
   }
 

+ 1 - 0
packages/core/src/interfaces/user.ts

@@ -20,6 +20,7 @@ export type IUser = {
   createdAt: Date,
   lastLoginAt?: Date,
   introduction: string,
+  status: number,
 }
 
 export type IUserGroupRelation = {