Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the API layer #7

Merged
merged 10 commits into from Oct 24, 2022
Merged

Implement the API layer #7

merged 10 commits into from Oct 24, 2022

Conversation

chadstewart
Copy link
Collaborator

Implementing API layer to make spinning up accessing endpoints easier.

Details:

  • Set up a main api function with axios that endpoints will inherit from
  • Set up hooks to use endpoints to use meta data for components
  • Wrote example usage of api layer
  • Made some changes to header component to solve a React warning

@vercel
Copy link

vercel bot commented Oct 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
techishiring-website ✅ Ready (Inspect) Visit Preview Oct 24, 2022 at 3:20PM (UTC)

@chadstewart chadstewart merged commit a1cd093 into dev Oct 24, 2022
@chadstewart chadstewart deleted the implement-api-layer branch October 24, 2022 15:20
chadstewart added a commit that referenced this pull request Oct 29, 2022
* Added types definition file to facilitate page layout types.

* Set up layouts in _app.tsx. Also updated next from latest to ^12.3.1 to avoid breaking changes on deployment.

* Created Atomic Design folder structure for stories.

* Experimenting with migrating default next page into components to make sure layout works.

* Continuing the default next page migration process.

* Got default layout component set up. Now trying to figure out why assigning it as a parameter in an object is not working.

* Got the layout working but Tailwind broke so I need to work on that.

* Fixed issue with Tailwind. Config file was pointing to the wrong place.

* Building the header and footer of the site (#2)

* Made some minor changes to structure of app.

* Setting up atoms needed for header and footer.

* Added TechIsHirng logo and corresponding story.

* Created Icon atom with corresponding stories.

* Forgot to add a story for default layout so quickly threw one together.

* Created header and added logo.

* Added socials to footer with links.

* Adding header and footer stories.

* Forgot to add GitHub icon.

* Some clean up and adding a way to easily clean install node_modules.

* Added single navlink and main nav components and corresponding stories.

* Added main nav to header without styling. Will style now.

* Did some quick clean up and added a general link atom and its corresponding story.

* Styled the desktop navigation and started work on mobile navigation.

* Added mobile menu. Added Chakra UI to implement mobile menu. Will leverage Chakra UI components in the future.

* Added actual links to pages. Pages currently do not exist.

* Added typography and their corresponding stories.

* Updating link component for logo.

* Putting key in maps for navList.

* Adding the twitter list for TechIsHiring to body of app (#3)

* Moved main html tag to layout.

* Just quickly made other pages for the other links for now.

* Added ability to view tweets from the TechIsHiring Twitter account.

* Did some clean up to the app to improve SEO when launched. (#4)

* Forgot to add Twitter feed story.

* Started to do initial seo stuff.

* Added next-sitemap and test generated a sitemap.

* Implement the API layer (#7)

* Building the base api file.

* Building api statues file.

* Realized there was a React warning about uppercase in props and decided to quickly fix it.

* Tested an example api to make sure what I was doing was correct. Will need to update useApiStatus as it's current form doesn't allow for intellisense.

* Successfully added useApi hook.

* Created an example component to show how the api layer works and moved the example api and the component into their own example folder.

* Added a folder for endpoints and created a file with links to where I got this implementation.

* Renamed implemenation source file to references.txt.

* Adding an example of data fetching with the API layer that is nextjs specific.

* Restructuring api folder to be more explicit and clear of content.

* Create About page for TechIsHiring website (#9)

* Created card component and it's corresponding story.

* Updated Twitter feed to use card component.

* Added about page but getting a hydration error. Going to try and fix that right now.

* Fixed issue with hydration error. When using Chakra UI text, you need to use 'as' to make into into the appropriate html tag.

* Add posthog to website! (#8)

* changed .env variable to .env.local and added posthog id. Will add posthog id to server as well.

* Successfully added posthog to app.

* Added eslint to project (#10)

* Added eslint from next and formatted project.

* Forgot that stories were formatted weird.

* Implement newsletter page (#11)

* Added a basic endpoint for revue. Haven't tested yet.

* Tested issues api and did some clean up to make it more usable in TypeScript.

* Added subscribers api (not tested yet) and beginning putting together newsletter page.

* Working on newsletter page. Adding necessary atoms so I can begin to test api.

* Set up email entry. Can now test api.

* Created a subscribe to newsletter molecule and migrated the code from newsletter content there.

* Did some quick markup clean up.

* Pivoting to making a next api to send request to revue because of cors issue. Testing now.

* Got the api to work. Just need to clean up the app based on what the request sends back.

* Added different states for how the email response.

* Created newsletter entries organism to show the latest newsletters.

* Doing some clean up on project.

* Doing some quick clean up before full release. (#12)

* Fixing a bug where even though the api returned an error, the newsletter will say that it successfully went through.

* Made top nav stick to the top.

* Did active link for nav.

* Added example for building layouts

* Redid README file.

* Added better image for TechIsHiring logo.

* Pulled out newsletterentry from newsletter organism and made it a molecule.

* Updated README to add Design Document.

* Changed link to use next/link component and fixed some warnings throughout app.

* Changed a console.log to output a string instead of the error because the error had the API Key.
chadstewart added a commit that referenced this pull request Oct 29, 2022
* Added types definition file to facilitate page layout types.

* Set up layouts in _app.tsx. Also updated next from latest to ^12.3.1 to avoid breaking changes on deployment.

* Created Atomic Design folder structure for stories.

* Experimenting with migrating default next page into components to make sure layout works.

* Continuing the default next page migration process.

* Got default layout component set up. Now trying to figure out why assigning it as a parameter in an object is not working.

* Got the layout working but Tailwind broke so I need to work on that.

* Fixed issue with Tailwind. Config file was pointing to the wrong place.

* Building the header and footer of the site (#2)

* Made some minor changes to structure of app.

* Setting up atoms needed for header and footer.

* Added TechIsHirng logo and corresponding story.

* Created Icon atom with corresponding stories.

* Forgot to add a story for default layout so quickly threw one together.

* Created header and added logo.

* Added socials to footer with links.

* Adding header and footer stories.

* Forgot to add GitHub icon.

* Some clean up and adding a way to easily clean install node_modules.

* Added single navlink and main nav components and corresponding stories.

* Added main nav to header without styling. Will style now.

* Did some quick clean up and added a general link atom and its corresponding story.

* Styled the desktop navigation and started work on mobile navigation.

* Added mobile menu. Added Chakra UI to implement mobile menu. Will leverage Chakra UI components in the future.

* Added actual links to pages. Pages currently do not exist.

* Added typography and their corresponding stories.

* Updating link component for logo.

* Putting key in maps for navList.

* Adding the twitter list for TechIsHiring to body of app (#3)

* Moved main html tag to layout.

* Just quickly made other pages for the other links for now.

* Added ability to view tweets from the TechIsHiring Twitter account.

* Did some clean up to the app to improve SEO when launched. (#4)

* Forgot to add Twitter feed story.

* Started to do initial seo stuff.

* Added next-sitemap and test generated a sitemap.

* Implement the API layer (#7)

* Building the base api file.

* Building api statues file.

* Realized there was a React warning about uppercase in props and decided to quickly fix it.

* Tested an example api to make sure what I was doing was correct. Will need to update useApiStatus as it's current form doesn't allow for intellisense.

* Successfully added useApi hook.

* Created an example component to show how the api layer works and moved the example api and the component into their own example folder.

* Added a folder for endpoints and created a file with links to where I got this implementation.

* Renamed implemenation source file to references.txt.

* Adding an example of data fetching with the API layer that is nextjs specific.

* Restructuring api folder to be more explicit and clear of content.

* Create About page for TechIsHiring website (#9)

* Created card component and it's corresponding story.

* Updated Twitter feed to use card component.

* Added about page but getting a hydration error. Going to try and fix that right now.

* Fixed issue with hydration error. When using Chakra UI text, you need to use 'as' to make into into the appropriate html tag.

* Add posthog to website! (#8)

* changed .env variable to .env.local and added posthog id. Will add posthog id to server as well.

* Successfully added posthog to app.

* Added eslint to project (#10)

* Added eslint from next and formatted project.

* Forgot that stories were formatted weird.

* Implement newsletter page (#11)

* Added a basic endpoint for revue. Haven't tested yet.

* Tested issues api and did some clean up to make it more usable in TypeScript.

* Added subscribers api (not tested yet) and beginning putting together newsletter page.

* Working on newsletter page. Adding necessary atoms so I can begin to test api.

* Set up email entry. Can now test api.

* Created a subscribe to newsletter molecule and migrated the code from newsletter content there.

* Did some quick markup clean up.

* Pivoting to making a next api to send request to revue because of cors issue. Testing now.

* Got the api to work. Just need to clean up the app based on what the request sends back.

* Added different states for how the email response.

* Created newsletter entries organism to show the latest newsletters.

* Doing some clean up on project.

* Doing some quick clean up before full release. (#12)

* Fixing a bug where even though the api returned an error, the newsletter will say that it successfully went through.

* Made top nav stick to the top.

* Did active link for nav.

* Added example for building layouts

* Redid README file.

* Added better image for TechIsHiring logo.

* Pulled out newsletterentry from newsletter organism and made it a molecule.

* Updated README to add Design Document.

* Changed link to use next/link component and fixed some warnings throughout app.

* Changed a console.log to output a string instead of the error because the error had the API Key.

* Fixed link issue. Will need to come up with a proper solution later. (#14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant