Fix absolute import

feat/roadmap-slug
Kamran Ahmed 11 months ago
parent 7856a78bba
commit 3d012f9c64
  1. 2
      src/lib/best-practice.ts
  2. 2
      src/lib/guide.ts
  3. 2
      src/lib/link-group.ts

@ -82,7 +82,7 @@ export async function getBestPracticeById(
id: string,
): Promise<BestPracticeFileType> {
const bestPracticeFile = await import(
`/src/data/best-practices/${id}/${id}.md`
`../data/best-practices/${id}/${id}.md`
);
return {

@ -65,7 +65,7 @@ export async function getAllGuides(): Promise<GuideFileType[]> {
}
export async function getGuideById(id: string): Promise<GuideFileType> {
const guide = await import(`/src/data/guides/${id}.md`);
const guide = await import(`../data/guides/${id}.md`);
return {
...guide,

@ -41,7 +41,7 @@ export async function getAllLinkGroups(): Promise<LinkGroupFileType[]> {
export async function getLinkGroupById(
groupId: string,
): Promise<LinkGroupFileType> {
const linkGroup = await import(`/src/data/link-groups/${groupId}.md`);
const linkGroup = await import(`../data/link-groups/${groupId}.md`);
return {
...linkGroup,

Loading…
Cancel
Save