Skip to content

Commit

Permalink
fix(query): Restore OG image functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Bitter committed Aug 4, 2021
1 parent a5b8dd5 commit 8eeeca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/static/js/utils/api/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ const fetchFromLocalMarkdown = (path: string) => {

let baseUrl = process.env.NODE_ENV === "development" ? "http://localhost:3000" : `https://davebitter.com`;

export default async (path: string) => process.env.CI && path !== '/content/friday-tips' ? fetchFromLocalMarkdown(path) : await fetch(`${baseUrl}/api${path}`).then((res) => res.json()).catch(() => fetchFromLocalMarkdown(path));
export default async (path: string) => path !== '/content/friday-tips' ? fetchFromLocalMarkdown(path) : await fetch(`${baseUrl}/api${path}`).then((res) => res.json()).catch(() => fetchFromLocalMarkdown(path));

0 comments on commit 8eeeca0

Please sign in to comment.