Apparently it needs to be over here
Test / test (push) Failing after 55s Details

This commit is contained in:
Jeff 2024-09-21 21:59:18 -04:00
parent a912958b93
commit ff37214122
6 changed files with 170 additions and 574 deletions

2
.gitignore vendored
View File

@ -2,7 +2,7 @@
data/
node_modules/
build/
public/
/public/
/test-results/
/playwright-report/
/blob-report/

View File

@ -6,6 +6,7 @@ import {
ScrollRestoration,
} from "@remix-run/react"
import React from "react"
import { ManifestLink } from "@remix-pwa/sw"
export function Layout({ children }: { children: React.ReactNode }) {
return (
@ -14,8 +15,8 @@ export function Layout({ children }: { children: React.ReactNode }) {
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<ManifestLink manifestUrl="/public/site.webmanifest" />
<Links />
<link rel="manifest" href="/site.webmanifest" />
</head>
<body>
{children}

View File

@ -4,7 +4,7 @@ import {
type MetaFunction,
} from "@remix-run/node"
import { useLoaderData } from "@remix-run/react"
import React, { useState } from "react"
import React, { Suspense, useEffect, useState } from "react"
import coerceSemver from "semver/functions/coerce"
import versionAtLeast from "semver/functions/gte"
import UAParser from "ua-parser-js"
@ -32,7 +32,9 @@ export default function Index() {
return (
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
<LandingMessage isSupported={isSupported} />
<Suspense>
<LandingMessage isSupported={isSupported} />
</Suspense>
</div>
)
}
@ -49,18 +51,23 @@ function LandingMessage({ isSupported }: { isSupported: boolean }) {
(("standalone" in navigator && (navigator.standalone as boolean)) ||
matchMedia("(dislay-mode: standalone)").matches)
const [rendered, setRendered] = useState(false)
const [isInstalled, setIsInstalled] = useState(notificationsEnabled)
return !isClient ? (
useEffect(() => {
setRendered(true)
}, [])
return !isClient || !rendered ? (
<div>Loading</div>
) : isInstalled ? (
<div>Your Notifications</div>
) : isRunningPWA && !notificationsEnabled ? (
<EnableButton onSubscribe={() => setIsInstalled(true)} />
) : isSupported ? (
"Install Tack Up Now!"
<div>Install Tack Up Now!</div>
) : (
"Sorry, your device doesn't support Tack Up Now! :("
<div>{"Sorry, your device doesn't support Tack Up Now! :("}</div>
)
}

719
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"test": "jest --config=jest.config.ts"
},
"dependencies": {
"@remix-pwa/sw": "^3.0.9",
"@remix-pwa/worker-runtime": "^2.1.4",
"@remix-run/express": "^2.9.1",
"@remix-run/node": "^2.9.0",
@ -75,4 +76,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}