Skip to content

Commit

Permalink
feat: use path.join
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed May 3, 2024
1 parent d2dddc6 commit 74b3a59
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/[lng]/page-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { promises as fs } from "fs";

Check failure on line 1 in src/app/[lng]/page-dialog.tsx

View workflow job for this annotation

GitHub Actions / quality

A Node.js builtin module should be imported with the node: protocol.

Check failure on line 1 in src/app/[lng]/page-dialog.tsx

View workflow job for this annotation

GitHub Actions / quality

A Node.js builtin module should be imported with the node: protocol.
import path from "path";

Check failure on line 2 in src/app/[lng]/page-dialog.tsx

View workflow job for this annotation

GitHub Actions / quality

A Node.js builtin module should be imported with the node: protocol.

Check failure on line 2 in src/app/[lng]/page-dialog.tsx

View workflow job for this annotation

GitHub Actions / quality

A Node.js builtin module should be imported with the node: protocol.
import { BackgroundBeams } from "@/components/animated/beams";
import { GlowingStarsBackgroundCard } from "@/components/animated/glowing-stars";
import { Card } from "@/components/ui/card";
Expand All @@ -11,7 +12,13 @@ import { Suspense } from "react";
async function getData(content: string, lng = "de") {
try {
const file = await fs.readFile(
`${process.cwd()}/src/content/${content}/${content}.${lng}.mdx`,
path.join(
process.cwd(),
"src",
"content",
content,
`${content}.${lng}.mdx`,
),
"utf8",
);
if (!file) return { mdxSource: "" };
Expand Down

0 comments on commit 74b3a59

Please sign in to comment.