Commit 6432746b authored by Chunchi Che's avatar Chunchi Che

update small

parent 0525a91d
Pipeline #20465 passed with stages
in 7 minutes and 19 seconds
...@@ -2,14 +2,12 @@ import React, { useEffect } from "react"; ...@@ -2,14 +2,12 @@ import React, { useEffect } from "react";
import { useAppSelector } from "../../hook"; import { useAppSelector } from "../../hook";
import { selectMeHint, selectOpHint } from "../../reducers/duel/hintSlice"; import { selectMeHint, selectOpHint } from "../../reducers/duel/hintSlice";
import { selectCurrentPhase } from "../../reducers/duel/phaseSlice"; import { selectCurrentPhase } from "../../reducers/duel/phaseSlice";
import { selectChat } from "../../reducers/chatSlice";
import { notification } from "antd"; import { notification } from "antd";
const HintNotification = () => { const HintNotification = () => {
const meHint = useAppSelector(selectMeHint); const meHint = useAppSelector(selectMeHint);
const opHint = useAppSelector(selectOpHint); const opHint = useAppSelector(selectOpHint);
const currentPhase = useAppSelector(selectCurrentPhase); const currentPhase = useAppSelector(selectCurrentPhase);
const chat = useAppSelector(selectChat);
const [api, contextHolder] = notification.useNotification(); const [api, contextHolder] = notification.useNotification();
useEffect(() => { useEffect(() => {
...@@ -39,16 +37,6 @@ const HintNotification = () => { ...@@ -39,16 +37,6 @@ const HintNotification = () => {
} }
}, [currentPhase]); }, [currentPhase]);
useEffect(() => {
if (chat !== "") {
api.info({
message: "Chat",
description: chat,
placement: "topLeft",
});
}
}, [chat]);
return <>{contextHolder}</>; return <>{contextHolder}</>;
}; };
......
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { Timeline, TimelineItemProps } from "antd"; import { Timeline, TimelineItemProps } from "antd";
import { UserOutlined, SettingOutlined } from "@ant-design/icons"; import { SettingOutlined } from "@ant-design/icons";
import { useAppSelector } from "../../hook"; import { useAppSelector } from "../../hook";
import { selectChat } from "../../reducers/chatSlice"; import { selectChat } from "../../reducers/chatSlice";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment