2
0

fix: 🐛 Remove missing creds GFont error

This commit is contained in:
Baptiste Arnaud
2022-05-11 07:25:09 -07:00
parent bf766e5cd9
commit c4cf793b5d

View File

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