diff options
| author | S1m <git@sgougeon.fr> | 2021-09-30 08:52:41 +0200 |
|---|---|---|
| committer | S1m <git@sgougeon.fr> | 2021-09-30 08:52:41 +0200 |
| commit | 7939793351d7f24d8f606da2f31630fa1a102f50 (patch) | |
| tree | f80b4750bcf18f0719f4b9055ca040e32f80c0bd | |
| parent | e0d895f22a2ceb27027f5ed01b270ac9e5dc5a04 (diff) | |
Remove parseQuery and use params
| -rw-r--r-- | web/src/index.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/web/src/index.js b/web/src/index.js index 4d1aa76..38a06b4 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -36,17 +36,12 @@ const makeThumbnailURL = mxc => `${HOMESERVER_URL}/_matrix/media/r0/thumbnail/${ // This is also used to fix scrolling to sections on Element iOS const isMobileSafari = navigator.userAgent.match(/(iPod|iPhone|iPad)/) && navigator.userAgent.match(/AppleWebKit/) -export const parseQuery = str => Object.fromEntries( - str.split("&") - .map(part => part.split("=")) - .map(([key, value = ""]) => [key, value])) - const supportedThemes = ["light", "dark", "black"] class App extends Component { constructor(props) { super(props) - this.defaultTheme = parseQuery(location.search.substr(1)).theme + this.defaultTheme = params.get("theme") this.state = { packs: [], loading: true, |
