2
0

build: 👷 New compose file and entrypoints

This commit is contained in:
Baptiste Arnaud
2022-05-25 08:13:35 -07:00
parent 4a5a92b973
commit 5d786f59cc
44 changed files with 288 additions and 113 deletions

View File

@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react'
import { Text, HStack } from '@chakra-ui/react'
import { SearchableDropdown } from '../../../shared/SearchableDropdown'
import { isEmpty } from 'utils'
type FontSelectorProps = {
activeFont?: string
@ -19,7 +20,7 @@ export const FontSelector = ({
}, [])
const fetchPopularFonts = async () => {
if (!process.env.NEXT_PUBLIC_GOOGLE_API_KEY) return []
if (isEmpty(process.env.NEXT_PUBLIC_GOOGLE_API_KEY)) return []
const response = await fetch(
`https://www.googleapis.com/webfonts/v1/webfonts?key=${process.env.NEXT_PUBLIC_GOOGLE_API_KEY}&sort=popularity`
)