Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsrobot committed Jan 7, 2024
1 parent acbad62 commit 38053a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/root.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import * as Toast from '@radix-ui/react-toast';
import env from "./environment.server.js";
import WebsocketContext from "./components/websocket-context.jsx";
import useWebSocket from 'react-use-websocket';
import { useLocation } from "@remix-run/react";

export const links = () => [
{ rel: "stylesheet", href: radixStyles },
Expand All @@ -38,6 +39,8 @@ export const loader = async ({ request }) => {
function App() {
const data = useLoaderData();

const location = useLocation();

const { lastJsonMessage, sendJsonMessage } = useWebSocket(data.wsUrl, {
heartbeat: true,
onOpen: () => {
Expand All @@ -60,6 +63,7 @@ function App() {
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="darkreader-lock" />
<link rel="canonical" href={`https://www.wikid.app${location.pathname}`}/>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png" />
<link rel="icon" type="image/png" sizes="512x512" href="/android-icon-512x512.png" />
Expand Down

0 comments on commit 38053a5

Please sign in to comment.