Implement minimum amount for a working matrix.to
This commit is contained in:
+27
-3
@@ -15,18 +15,42 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import "./App.scss";
|
||||
|
||||
import SingleColumn from "./layouts/SingleColumn";
|
||||
import CreateLinkTile from "./components/CreateLinkTile";
|
||||
import MatrixTile from "./components/MatrixTile";
|
||||
import Tile from "./components/Tile";
|
||||
import LinkRouter from "./pages/LinkRouter";
|
||||
|
||||
import "./App.scss";
|
||||
|
||||
/* eslint-disable no-restricted-globals */
|
||||
|
||||
const App: React.FC = () => {
|
||||
let page = (
|
||||
<>
|
||||
<CreateLinkTile /> <hr />{" "}
|
||||
</>
|
||||
);
|
||||
if (location.hash) {
|
||||
console.log(location.hash);
|
||||
if (location.hash.startsWith("#/")) {
|
||||
page = <LinkRouter link={location.hash.slice(2)} />;
|
||||
} else {
|
||||
console.log("asdfadf");
|
||||
page = (
|
||||
<Tile>
|
||||
Links should be in the format {location.host}/#/{"<"}
|
||||
matrix-resource-identifier{">"}
|
||||
</Tile>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<SingleColumn>
|
||||
<div className="topSpacer" />
|
||||
<CreateLinkTile />
|
||||
<hr />
|
||||
{page}
|
||||
<MatrixTile />
|
||||
<div className="bottomSpacer" />
|
||||
</SingleColumn>
|
||||
|
||||
Reference in New Issue
Block a user