Skip to content

Commit

Permalink
more nits
Browse files Browse the repository at this point in the history
  • Loading branch information
AaDalal committed Mar 8, 2024
1 parent 01c0f86 commit eec350b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 51 deletions.
43 changes: 0 additions & 43 deletions frontend/degree-plan/components/Requirements/Major.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/degree-plan/components/Requirements/QObject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interface CourseOptionProps {
}
const CourseOption = ({ full_code, semester, isChosen = false, ruleIsSatisfied = false, ruleId }: CourseOptionProps) => {
const [{ isDragging }, drag] = useDrag<DnDFulfillment, never, { isDragging: boolean }>(() => ({
type: ItemTypes.COURSE,
type: ItemTypes.FULFILLMENT,
item: {full_code: full_code, semester: null, rules: [ruleId], course: null },
collect: (monitor) => ({ isDragging: !!monitor.isDragging() }),
canDrag: !isChosen && !ruleIsSatisfied
Expand Down
17 changes: 10 additions & 7 deletions frontend/degree-plan/components/Requirements/Rule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const Row = styled.div`

const Indented = styled.div`
margin-left: .75rem;
margin-bottom: 1rem;
`


Expand Down Expand Up @@ -164,13 +165,15 @@ const RuleComponent = (ruleTree : RuleTree) => {
}
</RuleTitle>
</RuleTitleWrapper>
<Indented>
{children.map((ruleTree) => (
<div>
<RuleComponent {...ruleTree} />
</div>
))}
</Indented>
{!collapsed &&
<Indented>
{children.map((ruleTree) => (
<div>
<RuleComponent {...ruleTree} />
</div>
))}
</Indented>
}
</>
)
}
Expand Down

0 comments on commit eec350b

Please sign in to comment.