2
0

fix: 🔒️ Change Google fonts key

This commit is contained in:
Baptiste Arnaud
2022-03-17 17:02:30 +01:00
parent d8fe53012d
commit 89ac0f89cd
2 changed files with 6 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export const FontSelector = ({
const fetchPopularFonts = async () => { const fetchPopularFonts = async () => {
const response = await fetch( const response = await fetch(
`https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyD2YAiipBLNYg058Wm-sPE-e2dPDn_zX8w&sort=popularity` `https://www.googleapis.com/webfonts/v1/webfonts?key=${process.env.NEXT_PUBLIC_GOOGLE_API_KEY}&sort=popularity`
) )
return (await response.json()).items.map( return (await response.json()).items.map(
(item: { family: string }) => item.family (item: { family: string }) => item.family

View File

@ -47,6 +47,11 @@ Used authentication in the builder and for the Google Sheets integration step. M
| NEXT_PUBLIC_GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console | | NEXT_PUBLIC_GOOGLE_CLIENT_ID | -- | The Client ID from the Google API Console |
| GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console | | GOOGLE_CLIENT_SECRET | -- | The Client secret from the Google API Console |
Used for Google Fonts:
| Parameter | Default | Description |
| ---------------------------- | ------- | --------------------------------------------- |
| NEXT_PUBLIC_GOOGLE_API_KEY | -- | The API Key from the Google API Console |
## Builder ## Builder
The following variables are only used for the builder. The following variables are only used for the builder.