Configure global storage

This commit is contained in:
Jorik Schellekens
2020-09-01 10:14:13 +02:00
parent 890669741c
commit 47fe7860c3
7 changed files with 313 additions and 54 deletions
+13 -13
View File
@@ -14,34 +14,34 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import React from 'react';
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 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";
import GlobalContext from './contexts/GlobalContext';
/* eslint-disable no-restricted-globals */
const App: React.FC = () => {
let page = (
<>
<CreateLinkTile /> <hr />{" "}
<CreateLinkTile /> <hr />{' '}
</>
);
if (location.hash) {
console.log(location.hash);
if (location.hash.startsWith("#/")) {
if (location.hash.startsWith('#/')) {
page = <LinkRouter link={location.hash.slice(2)} />;
} else {
console.log("asdfadf");
console.log('asdfadf');
page = (
<Tile>
Links should be in the format {location.host}/#/{"<"}
matrix-resource-identifier{">"}
Links should be in the format {location.host}/#/{'<'}
matrix-resource-identifier{'>'}
</Tile>
);
}
@@ -50,7 +50,7 @@ const App: React.FC = () => {
return (
<SingleColumn>
<div className="topSpacer" />
{page}
<GlobalContext>{page}</GlobalContext>
<MatrixTile />
<div className="bottomSpacer" />
</SingleColumn>