update routes.ts
This commit is contained in:
parent
eaa86820cb
commit
527ac8ac54
|
|
@ -5,7 +5,7 @@ import { getListLog } from "../../api/apiLog";
|
|||
import "./ListLog.css";
|
||||
const ListLog = () => {
|
||||
const [listFile, setListFile] = useState([]);
|
||||
const [status, setStatus] = useState();
|
||||
const [status, setStatus] = useState(200);
|
||||
const [nameSearch, setNameSearch] = useState("");
|
||||
const getListFile = async () => {
|
||||
try {
|
||||
|
|
@ -41,7 +41,7 @@ const ListLog = () => {
|
|||
setNameSearch(e.target.value)
|
||||
}}></input>
|
||||
</div>
|
||||
{listFile?.filter((f)=>f.search(nameSearch)!==-1).map((file) => (
|
||||
{listFile?.filter((f)=>f.toLocaleLowerCase().search(nameSearch.toLocaleLowerCase())!==-1).map((file) => (
|
||||
<div>
|
||||
<Link to={"/logs/" + file}>{file}</Link>
|
||||
<br></br>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import "./ShowLog.css";
|
|||
const ShowLog = () => {
|
||||
let { name } = useParams();
|
||||
const [log, setLog] = useState({});
|
||||
const [status, setStatus] = useState();
|
||||
const [status, setStatus] = useState(200);
|
||||
const getContentLog = async () => {
|
||||
try {
|
||||
const res = await axios.get(getLog + "/" + name);
|
||||
|
|
@ -131,7 +131,7 @@ const ShowLog = () => {
|
|||
return (
|
||||
<div>
|
||||
<h1>
|
||||
<i>The file was not found or no errors were found in the file.</i>
|
||||
<i>The file was not found.</i>
|
||||
</h1>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue