فهرست منبع

studio 改为可选

visuddhinanda 3 سال پیش
والد
کامیت
20f6edaa4a
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      dashboard/src/components/auth/StudioCard.tsx

+ 4 - 4
dashboard/src/components/auth/StudioCard.tsx

@@ -4,7 +4,7 @@ import { IStudio } from "./StudioName";
 import { Link } from "react-router-dom";
 import { Link } from "react-router-dom";
 
 
 interface IWidget {
 interface IWidget {
-  studio: IStudio;
+  studio?: IStudio;
   children?: JSX.Element;
   children?: JSX.Element;
 }
 }
 const Widget = ({ studio, children }: IWidget) => {
 const Widget = ({ studio, children }: IWidget) => {
@@ -18,15 +18,15 @@ const Widget = ({ studio, children }: IWidget) => {
             <div style={{ display: "flex" }}>
             <div style={{ display: "flex" }}>
               <div style={{ paddingRight: 8 }}>
               <div style={{ paddingRight: 8 }}>
                 <Avatar style={{ backgroundColor: "#87d068" }} size="small">
                 <Avatar style={{ backgroundColor: "#87d068" }} size="small">
-                  {studio.nickName.slice(0, 1)}
+                  {studio?.nickName.slice(0, 1)}
                 </Avatar>
                 </Avatar>
               </div>
               </div>
               <div>
               <div>
-                <div>{studio.nickName}</div>
+                <div>{studio?.nickName}</div>
                 <div>译文(2) | 课程(3)</div>
                 <div>译文(2) | 课程(3)</div>
                 <div>
                 <div>
                   <Link
                   <Link
-                    to={`/blog/${studio.studioName}/overview`}
+                    to={`/blog/${studio?.studioName}/overview`}
                     target="_blank"
                     target="_blank"
                   >
                   >
                     {intl.formatMessage({
                     {intl.formatMessage({