Fix some style issues

This commit is contained in:
LASER-Yi 2021-05-09 21:54:09 +08:00
parent 38fc3b36fe
commit 4bb6e87db9
2 changed files with 9 additions and 5 deletions

View File

@ -95,9 +95,6 @@ const ProgressToast: FunctionComponent<ProgressHolderProps> = ({
return ( return (
<Toast onClose={remove}> <Toast onClose={remove}>
<Toast.Header hidden={incomplete}>
<span className="mr-auto">Background Task</span>
</Toast.Header>
<Toast.Body> <Toast.Body>
<div className="mb-2 mt-1"> <div className="mb-2 mt-1">
<FontAwesomeIcon <FontAwesomeIcon

View File

@ -1,7 +1,7 @@
import { faSync } from "@fortawesome/free-solid-svg-icons"; import { faSync } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent, useMemo } from "react"; import React, { FunctionComponent, useMemo } from "react";
import { Column } from "react-table"; import { Column, useSortBy } from "react-table";
import { SystemApi } from "../../apis"; import { SystemApi } from "../../apis";
import { AsyncButton, SimpleTable } from "../../components"; import { AsyncButton, SimpleTable } from "../../components";
@ -48,7 +48,14 @@ const Table: FunctionComponent<Props> = ({ tasks }) => {
[] []
); );
return <SimpleTable columns={columns} data={tasks}></SimpleTable>; return (
<SimpleTable
initialState={{ sortBy: [{ id: "name", desc: false }] }}
columns={columns}
data={tasks}
plugins={[useSortBy]}
></SimpleTable>
);
}; };
export default Table; export default Table;