mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
fix fathom and prettier
This commit is contained in:
@@ -16,5 +16,5 @@
|
||||
# Optional (for preview image support)
|
||||
#FIREBASE_COLLECTION_IMAGES=
|
||||
|
||||
# Optional
|
||||
# Optional (for fathom analytics)
|
||||
#NEXT_PUBLIC_FATHOM_ID=
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
? {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user