1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-29 12:10:22 +02:00

Fix empty guides listing on dashboard

This commit is contained in:
Kamran Ahmed
2025-08-18 21:25:53 +01:00
parent 50b04042ee
commit 830d365f3b
4 changed files with 8 additions and 6 deletions

View File

@@ -10,9 +10,9 @@ import { DashboardTabButton } from './DashboardTabButton';
import { PersonalDashboard, type BuiltInRoadmap } from './PersonalDashboard';
import { TeamDashboard } from './TeamDashboard';
import type { QuestionGroupType } from '../../lib/question-group';
import type { GuideFileType } from '../../lib/guide';
import type { VideoFileType } from '../../lib/video';
import { cn } from '../../lib/classname';
import type { OfficialGuideDocument } from '../../queries/official-guide';
type DashboardPageProps = {
builtInRoleRoadmaps?: BuiltInRoadmap[];
@@ -20,7 +20,7 @@ type DashboardPageProps = {
builtInBestPractices?: BuiltInRoadmap[];
isTeamPage?: boolean;
questionGroups?: QuestionGroupType[];
guides?: GuideFileType[];
guides?: OfficialGuideDocument[];
videos?: VideoFileType[];
};

View File

@@ -3,7 +3,6 @@ import { useEffect, useState } from 'react';
import type { AllowedProfileVisibility } from '../../api/user.ts';
import { useToast } from '../../hooks/use-toast';
import { cn } from '../../lib/classname.ts';
import type { GuideFileType } from '../../lib/guide';
import { httpGet } from '../../lib/http';
import type { QuestionGroupType } from '../../lib/question-group';
import type { AllowedRoadmapRenderer } from '../../lib/roadmap.ts';
@@ -21,6 +20,7 @@ import type { ProjectStatusDocument } from '../Projects/ListProjectSolutions';
import type { UserProgress } from '../TeamProgress/TeamProgressPage';
import { useIsPaidUser } from '../../queries/billing.ts';
import { UpgradeAccountModal } from '../Billing/UpgradeAccountModal.tsx';
import type { OfficialGuideDocument } from '../../queries/official-guide.ts';
const projectGroups = [
{
@@ -66,7 +66,7 @@ type PersonalDashboardProps = {
builtInSkillRoadmaps?: BuiltInRoadmap[];
builtInBestPractices?: BuiltInRoadmap[];
questionGroups?: QuestionGroupType[];
guides?: GuideFileType[];
guides?: OfficialGuideDocument[];
videos?: VideoFileType[];
};

View File

@@ -6,12 +6,13 @@ import { getAllQuestionGroups } from '../lib/question-group';
import { getRoadmapsByTag } from '../lib/roadmap';
import { getAllGuides } from '../lib/guide';
import { getAllVideos } from '../lib/video';
import { listOfficialGuides } from '../queries/official-guide';
const roleRoadmaps = await getRoadmapsByTag('role-roadmap');
const skillRoadmaps = await getRoadmapsByTag('skill-roadmap');
const bestPractices = await getAllBestPractices();
const questionGroups = await getAllQuestionGroups();
const guides = await getAllGuides();
const guides = await listOfficialGuides();
const videos = await getAllVideos();
const enrichedRoleRoadmaps = roleRoadmaps

View File

@@ -31,8 +31,9 @@ export const projectGroups = [
const guides = await listOfficialGuides();
const questionGuides = guides.filter(
(guide) => guide.roadmapId === 'questions' && !!guide?.authorId,
(guide) => guide.roadmapId === 'questions',
);
const videos = await getAllVideos();
---