Skip to content

Commit

Permalink
Merge pull request #49 from AElfProject/feature/github-pages-cache
Browse files Browse the repository at this point in the history
feat: image
  • Loading branch information
yongenaelf authored Jul 19, 2024
2 parents d6110b2 + 896263e commit f3820ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export default function Search() {

useEffect(() => {
(async () => {
const res = await fetch(`${process.env.NEXT_PUBLIC_SITE_URL}/api/search`);
const res = await fetch(
process.env.NODE_ENV === "development"
? "/api/search"
: `${process.env.NEXT_PUBLIC_SITE_URL}/api/search`
);
const data = await res.json();

const config = searchConfigSchema.parse(data);
Expand Down
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const nextConfig = {
pathname: "**",
},
],
unoptimized: true,
},
experimental: {
workerThreads: false,
Expand Down

0 comments on commit f3820ed

Please sign in to comment.