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, id: string,
): Promise<BestPracticeFileType> { ): Promise<BestPracticeFileType> {
const bestPracticeFile = await import( const bestPracticeFile = await import(
`/src/data/best-practices/${id}/${id}.md` `../data/best-practices/${id}/${id}.md`
); );
return { return {

@ -65,7 +65,7 @@ export async function getAllGuides(): Promise<GuideFileType[]> {
} }
export async function getGuideById(id: string): 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 { return {
...guide, ...guide,

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

Loading…
Cancel
Save