fix fathom and prettier

This commit is contained in:
Travis Fischer
2021-01-19 21:38:17 -05:00
parent f4d08bc21e
commit d17228efd7
4 changed files with 4 additions and 13 deletions

View File

@@ -16,5 +16,5 @@
# Optional (for preview image support)
#FIREBASE_COLLECTION_IMAGES=
# Optional
# Optional (for fathom analytics)
#NEXT_PUBLIC_FATHOM_ID=

View File

@@ -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

View File

@@ -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
? {

View File

@@ -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)