mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-15 04:45:45 +01:00
25 lines
754 B
JavaScript
25 lines
754 B
JavaScript
import React, { useEffect, useState } from "react";
|
|
import { Redirect } from "react-router-dom";
|
|
|
|
import "./about.scss";
|
|
|
|
export function AboutPage() {
|
|
const [version, setVersion] = useState("Filestash/vxxxx");
|
|
useEffect(() => {
|
|
const controller = new AbortController();
|
|
fetch("/about", { signal: controller.signal })
|
|
.then((r) => r.text())
|
|
.then((r) => {
|
|
const a = document.createElement("html")
|
|
a.innerHTML = r;
|
|
document.getElementById("about-page").innerHTML = a.querySelector("table").outerHTML
|
|
});
|
|
return () => controller.abort();
|
|
}, [])
|
|
|
|
return (
|
|
<div id="about-page">
|
|
loading...
|
|
</div>
|
|
);
|
|
}
|