Skip to content

Commit

Permalink
Quick fix can not fetch network data
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Feb 2, 2024
1 parent aaa46d1 commit 2e3ee9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/fetchStaticData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { STATIC_DATA_DOMAIN } from 'constants/index';
export async function fetchStaticData<T>(slug: string, targetFile?: string) {
const dataByDevModeStatus = getStaticContentByDevMode();
const fetchFile = targetFile || dataByDevModeStatus;
const rs = await axios.get(`${STATIC_DATA_DOMAIN}/${slug}/${fetchFile}`);
const rs = await axios.get(`${STATIC_DATA_DOMAIN}/${slug}/${fetchFile}.json`);

return rs.data as T;
}

0 comments on commit 2e3ee9e

Please sign in to comment.