visuddhinanda 2 лет назад
Родитель
Сommit
8f21706ba1

+ 1 - 0
dashboard/src/pages/studio/channel/show.tsx

@@ -26,6 +26,7 @@ const Widget = () => {
   useEffect(() => {
     get<IApiResponseChannel>(`/v2/channel/${channelId}`).then((json) => {
       setTitle(json.data.name);
+      document.title = `${json.data.name}`;
     });
   }, [channelId]);
   return (

+ 1 - 0
dashboard/src/pages/studio/course/edit.tsx

@@ -31,6 +31,7 @@ const Widget = () => {
                   courseId={courseId}
                   onTitleChange={(title: string) => {
                     setTitle(title);
+                    document.title = `${title}`;
                   }}
                 />
               ),

+ 1 - 1
dashboard/src/pages/studio/group/edit.tsx

@@ -41,7 +41,7 @@ const Widget = () => {
         request={async () => {
           const res = await get<IGroupResponse>(`/v2/group/${groupId}`);
           setTitle(res.data.name);
-          console.log(res.data);
+          document.title = `${res.data.name}`;
           return {
             id: res.data.uid,
             name: res.data.name,

+ 1 - 0
dashboard/src/pages/studio/group/show.tsx

@@ -17,6 +17,7 @@ const Widget = () => {
   useEffect(() => {
     get<IGroupResponse>(`/v2/group/${groupId}`).then((json) => {
       setTitle(json.data.name);
+      document.title = `${json.data.name}`;
     });
   }, [groupId]);
   return (