Advice generator app solution built with HTML,CSS & TYPESCRIPT

Solution retrospective
-the task was being able to store api key as window variable with TypeScript -being able to type cast and initialize interface for the quote structure -understanding async function in typescript and fetch method and its components
What challenges did you encounter, and how did you overcome them?const headers = new Headers({
"X-Api-Key": API_KEY,
"Content-Type": "application/json",
});
being able to modify the header of a fetch api
What specific areas of your project would you like help with?interface Window {
API_KEY: string;
}
const API_KEY = window.API_KEY ?? process.env.NEXT_PUBLIC_API_KEY ;
being able to export apikey and with out having a backend server being able to use .env files in front frontend projects
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Ibeaka Godson's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord