Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrated roadmap page to typescript #2913

Merged
merged 2 commits into from
Apr 27, 2024
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
2 changes: 1 addition & 1 deletion components/roadmap/RoadmapItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface IRoadmapItemProps {
*/
export default function RoadmapItem({ item, colorClass, showConnector = true, collapsed = true }: IRoadmapItemProps) {
const [isCollapsed, setIsCollapsed] = useState(collapsed);
const isCollapsible = item.solutions !== null || item.implementations !== null;
const isCollapsible = item.solutions !== undefined;

const connectorClasses = 'border-l-2 border-dashed border-gray-300';
const classNames = `pt-2 ${showConnector && connectorClasses}`;
Expand Down
7 changes: 3 additions & 4 deletions components/roadmap/RoadmapList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default function RoadmapList({
childrenCollapsed = true
}: IRoadmapListProps) {
return (
<>
items && items.length && (
items &&
items.length && (
<ul className={className} data-testid='RoadmapList-list'>
{!collapsed &&
items.map((item, index) => (
Expand All @@ -50,7 +50,6 @@ export default function RoadmapList({
/>
))}
</ul>
)
</>
)
);
}
2 changes: 1 addition & 1 deletion components/roadmap/RoadmapPill.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default function Pill({
</div>
{isCollapsible && (
<button className='mr-2' onClick={onClickCollapse} data-testid='RoadmapItem-button'>
<IconArrowRight className={`h-4${isCollapsed ? 'rotate-90' : '-rotate-90'}`} />
<IconArrowRight className={`h-4 ${isCollapsed ? 'rotate-90' : '-rotate-90'}`} />
</button>
)}
</div>
Expand Down
Loading
Loading