From d17228efd74174c0594fa7b870a3fec2fc88b0a1 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Tue, 19 Jan 2021 21:38:17 -0500 Subject: [PATCH] fix fathom and prettier --- .env.example | 2 +- api/create-preview-image.ts | 8 +++----- lib/config.ts | 5 ----- pages/_app.tsx | 2 -- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.env.example b/.env.example index ca825b5..701b16d 100644 --- a/.env.example +++ b/.env.example @@ -16,5 +16,5 @@ # Optional (for preview image support) #FIREBASE_COLLECTION_IMAGES= -# Optional +# Optional (for fathom analytics) #NEXT_PUBLIC_FATHOM_ID= diff --git a/api/create-preview-image.ts b/api/create-preview-image.ts index 86b5272..7e2ae57 100644 --- a/api/create-preview-image.ts +++ b/api/create-preview-image.ts @@ -13,11 +13,9 @@ export default async (req: NextApiRequest, res: NextApiResponse) => { } if (!isPreviewImageSupportEnabled) { - return res - .status(418) - .send({ - error: 'preview image support has been disabled for this deployment' - }) + return res.status(418).send({ + error: 'preview image support has been disabled for this deployment' + }) } const { url, id } = req.body diff --git a/lib/config.ts b/lib/config.ts index f1e6449..b9e973c 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -81,11 +81,6 @@ export const api = { // ---------------------------------------------------------------------------- export const fathomId = isDev ? null : process.env.NEXT_PUBLIC_FATHOM_ID -console.log('config', { - fathomId, - isDev, - env: process.env.NEXT_PUBLIC_FATHOM_ID -}) export const fathomConfig = fathomId ? { diff --git a/pages/_app.tsx b/pages/_app.tsx index 468e604..45ed2e4 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -31,8 +31,6 @@ export default function App({ Component, pageProps }) { const router = useRouter() React.useEffect(() => { - console.log('loading fathom', { fathomId, fathomConfig }) - if (fathomId) { Fathom.load(fathomId, fathomConfig)