From 1b4cb5845c21ce354b8ecf90f11865d8119370f8 Mon Sep 17 00:00:00 2001 From: m5r Date: Fri, 22 Dec 2023 23:59:14 +0100 Subject: [PATCH] npx prettier -w . --- .eslintrc.cjs | 2 +- app/entry.server.tsx | 26 +- app/hooks/use-fathom.ts | 21 +- app/root.tsx | 136 +- app/routes/_index.tsx | 95 +- app/styles/index.css | 27 +- package-lock.json | 22822 +++++++++++++++++++------------------- package.json | 74 +- remix.config.js | 10 +- tsconfig.json | 40 +- 10 files changed, 11623 insertions(+), 11630 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 2061cd2..613caf7 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,4 +1,4 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { - extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node"], + extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node"], }; diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 8a5252f..ac12326 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -16,18 +16,8 @@ export default function handleRequest( loadContext: AppLoadContext, ) { return isbot(request.headers.get("user-agent")) - ? handleBotRequest( - request, - responseStatusCode, - responseHeaders, - remixContext, - ) - : handleBrowserRequest( - request, - responseStatusCode, - responseHeaders, - remixContext, - ); + ? handleBotRequest(request, responseStatusCode, responseHeaders, remixContext) + : handleBrowserRequest(request, responseStatusCode, responseHeaders, remixContext); } function handleBotRequest( @@ -39,11 +29,7 @@ function handleBotRequest( return new Promise((resolve, reject) => { let shellRendered = false; const { pipe, abort } = renderToPipeableStream( - , + , { onAllReady() { shellRendered = true; @@ -89,11 +75,7 @@ function handleBrowserRequest( return new Promise((resolve, reject) => { let shellRendered = false; const { pipe, abort } = renderToPipeableStream( - , + , { onShellReady() { shellRendered = true; diff --git a/app/hooks/use-fathom.ts b/app/hooks/use-fathom.ts index a2cba79..e98e582 100644 --- a/app/hooks/use-fathom.ts +++ b/app/hooks/use-fathom.ts @@ -3,17 +3,16 @@ import { useLocation } from "@remix-run/react"; import * as Fathom from "fathom-client"; export default function useFathom() { - const location = useLocation(); + const location = useLocation(); - useEffect(() => { - Fathom.load(window.siteConfig.fathom.siteId, { - spa: "history", - includedDomains: ["local-ip.sh"], - }); - }, []); + useEffect(() => { + Fathom.load(window.siteConfig.fathom.siteId, { + spa: "history", + includedDomains: ["local-ip.sh"], + }); + }, []); - useEffect(() => { - Fathom.trackPageview(); - }, [location]); + useEffect(() => { + Fathom.trackPageview(); + }, [location]); } - diff --git a/app/root.tsx b/app/root.tsx index d5ff669..e51c0ed 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,90 +1,80 @@ import { cssBundleHref } from "@remix-run/css-bundle"; import { json, type SerializeFrom, type LinksFunction, type MetaFunction } from "@remix-run/node"; -import { - Links, - LiveReload, - Meta, - Outlet, - Scripts, - ScrollRestoration, - useLoaderData, -} from "@remix-run/react"; +import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration, useLoaderData } from "@remix-run/react"; import useFathom from "./hooks/use-fathom"; export const meta: MetaFunction = () => [ - { name: "title", content: "local-ip.sh" }, - { - name: "description", - content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", - }, - { name: "author", content: "Mokhtar Mial" }, - { name: "robots", content: "index,follow" }, - { name: "googlebot", content: "index,follow" }, - { property: "twitter:title", content: "local-ip.sh" }, - { - property: "twitter:description", - content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", - }, - { property: "twitter:card", content: "summary_large_image" }, - { property: "twitter:site", content: "https://local-ip.sh/" }, - { property: "twitter:image", content: "https://local-ip.sh/og.png" }, - { property: "twitter:image:alt", content: "og image" }, - { property: "og:title", content: "local-ip.sh" }, - { - property: "og:description", - content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", - }, - { property: "og:url", content: "https://local-ip.sh/" }, - { property: "og:type", content: "website" }, - { property: "og:image", content: "https://local-ip.sh/og.png" }, - { property: "og:image:alt", content: "og image" }, + { name: "title", content: "local-ip.sh" }, + { + name: "description", + content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", + }, + { name: "author", content: "Mokhtar Mial" }, + { name: "robots", content: "index,follow" }, + { name: "googlebot", content: "index,follow" }, + { property: "twitter:title", content: "local-ip.sh" }, + { + property: "twitter:description", + content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", + }, + { property: "twitter:card", content: "summary_large_image" }, + { property: "twitter:site", content: "https://local-ip.sh/" }, + { property: "twitter:image", content: "https://local-ip.sh/og.png" }, + { property: "twitter:image:alt", content: "og image" }, + { property: "og:title", content: "local-ip.sh" }, + { + property: "og:description", + content: "local-ip.sh is a magic domain name that provides wildcard DNS for any IP address.", + }, + { property: "og:url", content: "https://local-ip.sh/" }, + { property: "og:type", content: "website" }, + { property: "og:image", content: "https://local-ip.sh/og.png" }, + { property: "og:image:alt", content: "og image" }, ]; -export const links: LinksFunction = () => [ - ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []), -]; +export const links: LinksFunction = () => [...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : [])]; export const loader = () => - json({ - siteConfig: { - fathom: { - siteId: process.env.FATHOM_SITE_ID!, - domain: process.env.FATHOM_CUSTOM_DOMAIN!, - }, - }, - }); + json({ + siteConfig: { + fathom: { + siteId: process.env.FATHOM_SITE_ID!, + domain: process.env.FATHOM_CUSTOM_DOMAIN!, + }, + }, + }); declare global { - interface Window { - siteConfig: SerializeFrom["siteConfig"]; - } + interface Window { + siteConfig: SerializeFrom["siteConfig"]; + } } export default function App() { - const { siteConfig } = useLoaderData(); - useFathom(); + const { siteConfig } = useLoaderData(); + useFathom(); - return ( - - - - - - - - - -