Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/web/app/api/AddTracks/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export async function POST(req: NextRequest) {
const notion = new NotionAPI();
try {
const recordMap = await notion.getPage(notionId);
const data = Object.keys(recordMap.block).map((key) => {
const data = Object.keys(recordMap.block).filter((key) => {
const block = recordMap.block[key];
return block?.role !== "none"
}).map((key) => {
const block = recordMap.block[key];
return {
notionDocId: block?.value.id,
Expand Down
14 changes: 7 additions & 7 deletions apps/web/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export default function Hero({ tracks }: { tracks: TrackPros[] }) {
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(12.12436 -7 4.2 7.27461 16 16)"
>
<stop stop-color="#7D7D7D" />
<stop offset=".267" stop-color="#7E7C7A" />
<stop offset=".45" stop-color="#817871" />
<stop offset=".608" stop-color="#867162" />
<stop offset=".753" stop-color="#8D684C" />
<stop offset=".886" stop-color="#965C30" />
<stop offset="1" stop-color="#A04F12" />
<stop stopColor="#7D7D7D" />
<stop offset=".267" stopColor="#7E7C7A" />
<stop offset=".45" stopColor="#817871" />
<stop offset=".608" stopColor="#867162" />
<stop offset=".753" stopColor="#8D684C" />
<stop offset=".886" stopColor="#965C30" />
<stop offset="1" stopColor="#A04F12" />
</radialGradient>
</defs>
</motion.svg>
Expand Down
11 changes: 1 addition & 10 deletions apps/web/components/Tracks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,7 @@ export const Tracks = ({ tracks, categories }: TracksWithCategoriesProps) => {

const filterTracks = () => {
setLoading(true);
let newFilteredTracks = tracks;
if (selectedCohort) {
newFilteredTracks = newFilteredTracks.filter((t) => t.cohort === selectedCohort);
}
if (selectedCategory && selectedCategory !== "All") {
newFilteredTracks = newFilteredTracks.filter((t) =>
t.categories.some((c) => c.category.category === selectedCategory)
);
}
setFilteredTracks(newFilteredTracks);
setFilteredTracks(tracks.filter((t) => selectedCohort === 3 ? t.cohort === 3 : t.cohort !== 3));
setCurrentPage(1); // Reset to first page on filtering
setLoading(false);
};
Expand Down
1 change: 1 addition & 0 deletions apps/web/components/admin/CompleteTrackCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const CompleteTrackCard = ({ notionId, TrackData }: { notionId: string; TrackDat
problems: problems,
selectedCategory: TrackData.selectedCategory,
cohort: parseInt(TrackData.cohort),
trackType: "NOTION",
});
await insertData(TrackData.trackId);
setIsSubmitting(true);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module.exports = {
darkMode: ["class"],
content: [
"../../packages/ui/**/*.{ts,tsx}",
"../../packages/ui/src/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
Expand Down
Loading