@@ -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 (
@@ -31,6 +31,7 @@ const Widget = () => {
courseId={courseId}
onTitleChange={(title: string) => {
setTitle(title);
+ document.title = `${title}`;
}}
/>
),
@@ -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,
@@ -17,6 +17,7 @@ const Widget = () => {
get<IGroupResponse>(`/v2/group/${groupId}`).then((json) => {
}, [groupId]);