Skip to content

Commit cd15df3

Browse files
committed
fix: admin not being able to add tracks
1 parent f885800 commit cd15df3

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

apps/web/app/api/AddTracks/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export async function POST(req: NextRequest) {
1414
const notion = new NotionAPI();
1515
try {
1616
const recordMap = await notion.getPage(notionId);
17-
const data = Object.keys(recordMap.block).map((key) => {
17+
const data = Object.keys(recordMap.block).filter((key) => {
18+
const block = recordMap.block[key];
19+
return block?.role !== "none"
20+
}).map((key) => {
1821
const block = recordMap.block[key];
1922
return {
2023
notionDocId: block?.value.id,

apps/web/components/Hero.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ export default function Hero({ tracks }: { tracks: TrackPros[] }) {
115115
gradientUnits="userSpaceOnUse"
116116
gradientTransform="matrix(12.12436 -7 4.2 7.27461 16 16)"
117117
>
118-
<stop stop-color="#7D7D7D" />
119-
<stop offset=".267" stop-color="#7E7C7A" />
120-
<stop offset=".45" stop-color="#817871" />
121-
<stop offset=".608" stop-color="#867162" />
122-
<stop offset=".753" stop-color="#8D684C" />
123-
<stop offset=".886" stop-color="#965C30" />
124-
<stop offset="1" stop-color="#A04F12" />
118+
<stop stopColor="#7D7D7D" />
119+
<stop offset=".267" stopColor="#7E7C7A" />
120+
<stop offset=".45" stopColor="#817871" />
121+
<stop offset=".608" stopColor="#867162" />
122+
<stop offset=".753" stopColor="#8D684C" />
123+
<stop offset=".886" stopColor="#965C30" />
124+
<stop offset="1" stopColor="#A04F12" />
125125
</radialGradient>
126126
</defs>
127127
</motion.svg>

apps/web/components/admin/CompleteTrackCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const CompleteTrackCard = ({ notionId, TrackData }: { notionId: string; TrackDat
3434
problems: problems,
3535
selectedCategory: TrackData.selectedCategory,
3636
cohort: parseInt(TrackData.cohort),
37+
trackType: "NOTION",
3738
});
3839
await insertData(TrackData.trackId);
3940
setIsSubmitting(true);

apps/web/tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
module.exports = {
33
darkMode: ["class"],
44
content: [
5-
"../../packages/ui/**/*.{ts,tsx}",
5+
"../../packages/ui/src/**/*.{ts,tsx}",
66
"./app/**/*.{ts,tsx}",
77
"./pages/**/*.{ts,tsx}",
88
"./components/**/*.{ts,tsx}",

0 commit comments

Comments
 (0)