Skip to content

Commit

Permalink
style: remove unneccessary type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikssonJoakim committed Jan 5, 2023
1 parent 74f278f commit 98b7c79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/dropDown/phase/PhaseDropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const PhaseDropDown: React.FC<DropDownProps> = ({
</div>

<div className="okp4-nemeton-web-phase-dropdown-tasks">
{tasks.map(({ group, taskName, points }, index: number, array) => {
const previous: TaskDTO | null = index > 0 ? array[index - 1] : null
{tasks.map(({ group, taskName, points }, index, array) => {
const previous = index > 0 ? array[index - 1] : null
const mustDisplayGroup = !previous || previous.group !== group
return (
<div className="okp4-nemeton-web-phase-dropdown-task" key={index}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ const Faq: NextPage<FAQProps> = props => {
</div>
<div className="okp4-nemeton-web-page-content-wrapper">
{faqs({ discordUrl }).map(({ part, question, answer }, index, array) => {
const previous: FAQ | null = index > 0 ? array[index - 1] : null
const previous = index > 0 ? array[index - 1] : null
const active = activeIndex === index
const mustDisplayPart = !previous || previous.part !== part

Expand Down

0 comments on commit 98b7c79

Please sign in to comment.