Skip to content

Commit e8712fb

Browse files
author
Aleksander Katan
committed
Review fixes
1 parent 5f2335e commit e8712fb

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

apps/typegpu-docs/src/components/ExampleView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function filterRelevantTsFiles(
310310
];
311311

312312
for (const common of commonFiles) {
313-
for (const src of tsFiles) {
313+
for (const src of srcFiles) {
314314
if (src.content.includes(`common/${common.path}`)) {
315315
tsFiles.push(common);
316316
break;

apps/typegpu-docs/src/examples/exampleContent.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,11 @@ export const common = R.pipe(
148148
eager: true,
149149
import: 'default',
150150
}) as Record<string, string>,
151-
R.mapValues((content: string, key: string): ExampleCommonFile => {
152-
const pathRelToCommon = pathe.relative('./', key);
153-
const filePath = pathRelToCommon.split('/')[1];
154-
155-
return {
156-
common: true,
157-
path: filePath,
158-
content,
159-
};
160-
}),
151+
R.mapValues((content: string, key: string): ExampleCommonFile => ({
152+
common: true,
153+
path: pathe.basename(key),
154+
content,
155+
})),
161156
R.values(),
162157
);
163158

0 commit comments

Comments
 (0)