Commit 0d8c4b2f authored by Aral Balkan's avatar Aral Balkan
Browse files

Clean up code, remove unused elements, etc.

parent 8bbbda14
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
import { onMount, getContext } from 'svelte' import { onMount, getContext } from 'svelte'
import { get } from 'svelte/store' import { get } from 'svelte/store'
// Initialise context.
import { initialiseContext, state, signedIn} from './state.js' import { initialiseContext, state, signedIn} from './state.js'
initialiseContext()
// Initialise state.
initialiseContext()
const { publicSocket, privateToken, privateSocket, privateMessages } = getContext(state) const { publicSocket, privateToken, privateSocket, privateMessages } = getContext(state)
// Normal closure code for web sockets. // Normal closure code for web sockets.
......
<script> <script>
import Section from './Section.svelte' import Section from './Section.svelte'
import { getContext } from 'svelte' import { getContext } from 'svelte'
import { state } from '../state.js' import { state } from '../state.js'
......
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
import { BarLoader } from 'svelte-loading-spinners' import { BarLoader } from 'svelte-loading-spinners'
import { push } from 'svelte-spa-router' import { push } from 'svelte-spa-router'
let { privateToken } = getContext(state) let { privateToken } = getContext(state)
let passphraseField let passphraseField
let _privateToken = undefined let _privateToken = undefined
// Make sure the passphrase field has focus if it’s showing. // Make sure the passphrase field has focus if it’s showing.
......
<script> <script>
import { getContext } from 'svelte' import { signedIn } from '../state.js'
import { state, signedIn } from '../state.js'
import Section from './Section.svelte' import Section from './Section.svelte'
import { push } from 'svelte-spa-router' import { push } from 'svelte-spa-router'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment