Commit f25ddf27 authored by Chunchi Che's avatar Chunchi Che

fix small

parent b201cb28
Pipeline #22689 passed with stages
in 11 minutes and 55 seconds
......@@ -23,18 +23,21 @@ const localStore = proxy(defaultProps);
export const EndModal: React.FC = () => {
const { isOpen, isWin, reason } = useSnapshot(localStore);
const { isReplay } = useSnapshot(matStore);
return (
<NeosModal
title={fetchStrings("!system", 1500)}
open={isOpen}
onOk={() => {
const replayBuffers = replayStore.encode();
const blob = new Blob(replayBuffers, {
type: "application/octet-stream",
});
// download the replay file
window.open(URL.createObjectURL(blob));
if (!isReplay) {
const replayBuffers = replayStore.encode();
const blob = new Blob(replayBuffers, {
type: "application/octet-stream",
});
// download the replay file
window.open(URL.createObjectURL(blob));
}
rs();
}}
onCancel={() => {
......@@ -44,7 +47,7 @@ export const EndModal: React.FC = () => {
>
<p>{isWin ? "Win" : "Defeated"}</p>
<p>{reason}</p>
{matStore.isReplay ? <></> : <p>{fetchStrings("!system", 1340)}</p>}
{isReplay ? <></> : <p>{fetchStrings("!system", 1340)}</p>}
</NeosModal>
);
};
......
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