fix bug recursive FileDialog
This commit is contained in:
@@ -9,14 +9,9 @@ function FileDialog(props) {
|
|||||||
|
|
||||||
let navigate = useNavigate();
|
let navigate = useNavigate();
|
||||||
|
|
||||||
if (!props.showStatus) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<dialog open>
|
<dialog open={props.showStatus}>
|
||||||
<p>{props.file.filename}</p>
|
<p>{props.file.filename}</p>
|
||||||
<FileDialog file={props.file} />
|
|
||||||
<p>
|
<p>
|
||||||
Download 使用 Axios 异步下载
|
Download 使用 Axios 异步下载
|
||||||
<br />
|
<br />
|
||||||
@@ -32,10 +27,14 @@ function FileDialog(props) {
|
|||||||
>
|
>
|
||||||
Play
|
Play
|
||||||
</button>
|
</button>
|
||||||
<button onClick={() => {
|
<button
|
||||||
navigate(`/share/${props.file.id}`)
|
onClick={() => {
|
||||||
props.setShowStatus(false);
|
navigate(`/share/${props.file.id}`);
|
||||||
}}>Share</button>
|
props.setShowStatus(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Share
|
||||||
|
</button>
|
||||||
<button onClick={() => props.setShowStatus(false)}>Close</button>
|
<button onClick={() => props.setShowStatus(false)}>Close</button>
|
||||||
</dialog>
|
</dialog>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user