Apparently it needs to be over here
Test / test (push) Failing after 55s
Details
Test / test (push) Failing after 55s
Details
This commit is contained in:
parent
a912958b93
commit
ff37214122
|
|
@ -2,7 +2,7 @@
|
||||||
data/
|
data/
|
||||||
node_modules/
|
node_modules/
|
||||||
build/
|
build/
|
||||||
public/
|
/public/
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/blob-report/
|
/blob-report/
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import {
|
||||||
ScrollRestoration,
|
ScrollRestoration,
|
||||||
} from "@remix-run/react"
|
} from "@remix-run/react"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
import { ManifestLink } from "@remix-pwa/sw"
|
||||||
|
|
||||||
export function Layout({ children }: { children: React.ReactNode }) {
|
export function Layout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -14,8 +15,8 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
||||||
<meta charSet="utf-8" />
|
<meta charSet="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<Meta />
|
<Meta />
|
||||||
|
<ManifestLink manifestUrl="/public/site.webmanifest" />
|
||||||
<Links />
|
<Links />
|
||||||
<link rel="manifest" href="/site.webmanifest" />
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{children}
|
{children}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import {
|
||||||
type MetaFunction,
|
type MetaFunction,
|
||||||
} from "@remix-run/node"
|
} from "@remix-run/node"
|
||||||
import { useLoaderData } from "@remix-run/react"
|
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 coerceSemver from "semver/functions/coerce"
|
||||||
import versionAtLeast from "semver/functions/gte"
|
import versionAtLeast from "semver/functions/gte"
|
||||||
import UAParser from "ua-parser-js"
|
import UAParser from "ua-parser-js"
|
||||||
|
|
@ -32,7 +32,9 @@ export default function Index() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
|
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
|
||||||
<LandingMessage isSupported={isSupported} />
|
<Suspense>
|
||||||
|
<LandingMessage isSupported={isSupported} />
|
||||||
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -49,18 +51,23 @@ function LandingMessage({ isSupported }: { isSupported: boolean }) {
|
||||||
(("standalone" in navigator && (navigator.standalone as boolean)) ||
|
(("standalone" in navigator && (navigator.standalone as boolean)) ||
|
||||||
matchMedia("(dislay-mode: standalone)").matches)
|
matchMedia("(dislay-mode: standalone)").matches)
|
||||||
|
|
||||||
|
const [rendered, setRendered] = useState(false)
|
||||||
const [isInstalled, setIsInstalled] = useState(notificationsEnabled)
|
const [isInstalled, setIsInstalled] = useState(notificationsEnabled)
|
||||||
|
|
||||||
return !isClient ? (
|
useEffect(() => {
|
||||||
|
setRendered(true)
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return !isClient || !rendered ? (
|
||||||
<div>Loading</div>
|
<div>Loading</div>
|
||||||
) : isInstalled ? (
|
) : isInstalled ? (
|
||||||
<div>Your Notifications</div>
|
<div>Your Notifications</div>
|
||||||
) : isRunningPWA && !notificationsEnabled ? (
|
) : isRunningPWA && !notificationsEnabled ? (
|
||||||
<EnableButton onSubscribe={() => setIsInstalled(true)} />
|
<EnableButton onSubscribe={() => setIsInstalled(true)} />
|
||||||
) : isSupported ? (
|
) : 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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,6 +13,7 @@
|
||||||
"test": "jest --config=jest.config.ts"
|
"test": "jest --config=jest.config.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@remix-pwa/sw": "^3.0.9",
|
||||||
"@remix-pwa/worker-runtime": "^2.1.4",
|
"@remix-pwa/worker-runtime": "^2.1.4",
|
||||||
"@remix-run/express": "^2.9.1",
|
"@remix-run/express": "^2.9.1",
|
||||||
"@remix-run/node": "^2.9.0",
|
"@remix-run/node": "^2.9.0",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue