Only needed once
This commit is contained in:
parent
c4a3741542
commit
8b99bcc6a8
1 changed files with 4 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import { enc } from "../aes";
|
||||||
import CloakedHead from "../util/CloakedHead";
|
import CloakedHead from "../util/CloakedHead";
|
||||||
import { useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import { setTransport } from "../util/transports";
|
import { setTransport } from "../util/transports";
|
||||||
|
import { updateServiceWorkers } from "../util/SWHelper.js";
|
||||||
|
|
||||||
export function Home() {
|
export function Home() {
|
||||||
const [isFocused, setIsFocused] = useState(false);
|
const [isFocused, setIsFocused] = useState(false);
|
||||||
|
|
@ -19,8 +20,10 @@ export function Home() {
|
||||||
const handleLoad = () => {
|
const handleLoad = () => {
|
||||||
const firstLoad = localStorage.getItem("firstLoad") || "true";
|
const firstLoad = localStorage.getItem("firstLoad") || "true";
|
||||||
console.log(firstLoad);
|
console.log(firstLoad);
|
||||||
|
//make sure service workers are updated
|
||||||
|
updateServiceWorkers();
|
||||||
//make sure transport is set
|
//make sure transport is set
|
||||||
setTransport();
|
//setTransport();
|
||||||
if (firstLoad == "true" && prod) {
|
if (firstLoad == "true" && prod) {
|
||||||
function changeBare(url: string) {
|
function changeBare(url: string) {
|
||||||
set("bare", url);
|
set("bare", url);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue