|
|
@ -2,13 +2,19 @@ import type { GetPublicProfileResponse } from '../../api/user'; |
|
|
|
import { UserPublicProgressStats } from './UserPublicProgressStats'; |
|
|
|
import { UserPublicProgressStats } from './UserPublicProgressStats'; |
|
|
|
|
|
|
|
|
|
|
|
type UserPublicProgressesProps = { |
|
|
|
type UserPublicProgressesProps = { |
|
|
|
|
|
|
|
userId: string; |
|
|
|
username: string; |
|
|
|
username: string; |
|
|
|
roadmaps: GetPublicProfileResponse['roadmaps']; |
|
|
|
roadmaps: GetPublicProfileResponse['roadmaps']; |
|
|
|
publicConfig: GetPublicProfileResponse['publicConfig']; |
|
|
|
publicConfig: GetPublicProfileResponse['publicConfig']; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export function UserPublicProgresses(props: UserPublicProgressesProps) { |
|
|
|
export function UserPublicProgresses(props: UserPublicProgressesProps) { |
|
|
|
const { roadmaps: roadmapProgresses = [], username, publicConfig } = props; |
|
|
|
const { |
|
|
|
|
|
|
|
roadmaps: roadmapProgresses = [], |
|
|
|
|
|
|
|
username, |
|
|
|
|
|
|
|
publicConfig, |
|
|
|
|
|
|
|
userId, |
|
|
|
|
|
|
|
} = props; |
|
|
|
const { roadmapVisibility, customRoadmapVisibility } = publicConfig! || {}; |
|
|
|
const { roadmapVisibility, customRoadmapVisibility } = publicConfig! || {}; |
|
|
|
|
|
|
|
|
|
|
|
const roadmaps = roadmapProgresses.filter( |
|
|
|
const roadmaps = roadmapProgresses.filter( |
|
|
@ -43,6 +49,7 @@ export function UserPublicProgresses(props: UserPublicProgressesProps) { |
|
|
|
roadmapSlug={roadmap.roadmapSlug} |
|
|
|
roadmapSlug={roadmap.roadmapSlug} |
|
|
|
isCustomResource={false} |
|
|
|
isCustomResource={false} |
|
|
|
username={username!} |
|
|
|
username={username!} |
|
|
|
|
|
|
|
userId={userId} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
))} |
|
|
|
))} |
|
|
@ -74,6 +81,7 @@ export function UserPublicProgresses(props: UserPublicProgressesProps) { |
|
|
|
roadmapSlug={roadmap.roadmapSlug} |
|
|
|
roadmapSlug={roadmap.roadmapSlug} |
|
|
|
username={username!} |
|
|
|
username={username!} |
|
|
|
isCustomResource={true} |
|
|
|
isCustomResource={true} |
|
|
|
|
|
|
|
userId={userId} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
))} |
|
|
|
))} |
|
|
|