Skip to content

Commit

Permalink
Change getServerSideProps to getStaticProps in projects.tsx and resum…
Browse files Browse the repository at this point in the history
…e.tsx
  • Loading branch information
Kevin-Kwan committed Jan 10, 2024
1 parent f334366 commit ef8dc8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default function Projects({ descriptions }: ProjectsProps) {
);
}

export async function getServerSideProps() {
export async function getStaticProps() {
const descriptions: { [key: string]: string } = {};

try {
Expand Down
2 changes: 1 addition & 1 deletion pages/resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function Resume({ adobeClientId }: ResumeProps) {
);
}

export async function getServerSideProps() {
export async function getStaticProps() {
const adobeClientId = process.env.ADOBE_CLIENT_ID;

return {
Expand Down

1 comment on commit ef8dc8f

@Kevin-Kwan
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This greatly reduces GitHub API usage since requests aren't made every time a person reloads the page. Very noteworthy change.

Please sign in to comment.