diff --git a/.gitignore b/.gitignore index a547bf3..438657a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ node_modules dist dist-ssr *.local +.env # Editor directories and files .vscode/* diff --git a/src/components/Quotes/QuotesSection.jsx b/src/components/Quotes/QuotesSection.jsx index a8ca8bd..4722236 100644 --- a/src/components/Quotes/QuotesSection.jsx +++ b/src/components/Quotes/QuotesSection.jsx @@ -4,6 +4,7 @@ import "./QuoteSection.css"; const QuoteSection = () => { const [quote, setQuote] = useState(""); + const authInfo = process.env.QUOTES_API_KEY; useEffect(() => { fetchDailyQuote(); @@ -13,7 +14,7 @@ const QuoteSection = () => { try { const response = await fetch("https://api.yourquoteapi.com/quotes?author=Chanakya", { headers: { - "Authorization": `4fe303f4bamshb97ef5b1dd575e0p1ccc51jsnd9644d3c587b` + "Authorization": authInfo, } }); const data = await response.json();