fix: 🐛 Remove missing creds GFont error
This commit is contained in:
@ -19,6 +19,7 @@ export const FontSelector = ({
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const fetchPopularFonts = async () => {
|
const fetchPopularFonts = async () => {
|
||||||
|
if (!process.env.NEXT_PUBLIC_GOOGLE_API_KEY) return []
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`https://www.googleapis.com/webfonts/v1/webfonts?key=${process.env.NEXT_PUBLIC_GOOGLE_API_KEY}&sort=popularity`
|
`https://www.googleapis.com/webfonts/v1/webfonts?key=${process.env.NEXT_PUBLIC_GOOGLE_API_KEY}&sort=popularity`
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user