Format
This commit is contained in:
parent
5154da62ab
commit
7e44d6cdb2
5 changed files with 158 additions and 152 deletions
|
|
@ -1,7 +1,11 @@
|
||||||
import { FaAngleDown } from "react-icons/fa";
|
import { FaAngleDown } from "react-icons/fa";
|
||||||
import { useState, useEffect } from "preact/hooks"
|
import { useState, useEffect } from "preact/hooks";
|
||||||
import { changeTransport } from "../../util/transports.ts";
|
import { changeTransport } from "../../util/transports.ts";
|
||||||
const wispUrl = localStorage.getItem("wispUrl") || (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/wisp/";
|
const wispUrl =
|
||||||
|
localStorage.getItem("wispUrl") ||
|
||||||
|
(location.protocol === "https:" ? "wss://" : "ws://") +
|
||||||
|
location.host +
|
||||||
|
"/wisp/";
|
||||||
|
|
||||||
interface Option {
|
interface Option {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@ export default function Routes() {
|
||||||
scope: "/~/"
|
scope: "/~/"
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log("Service worker registered successfully setting transport");
|
console.log(
|
||||||
|
"Service worker registered successfully setting transport"
|
||||||
|
);
|
||||||
setTransport();
|
setTransport();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue