tutorbookapp/tutorbook

View on GitHub

Showing 399 of 518 total issues

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  const onBioChange = useCallback(
    (evt: FormEvent<HTMLInputElement>) => {
      const bio = evt.currentTarget.value;
      track('User Bio Updated', { bio });
      setUser((prev) => new User({ ...prev, bio }));
Severity: Major
Found in components/signup/index.tsx and 7 other locations - About 2 hrs to fix
components/signup/index.tsx on lines 105..112
components/signup/index.tsx on lines 113..120
components/signup/index.tsx on lines 121..128
components/users/dialog.tsx on lines 83..90
components/users/dialog.tsx on lines 91..98
components/users/dialog.tsx on lines 99..106
components/users/dialog.tsx on lines 127..134

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 86.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

  const onEmailChange = useCallback(
    (evt: FormEvent<HTMLInputElement>) => {
      const email = evt.currentTarget.value;
      track('User Email Updated', { email });
      setUser((prev) => new User({ ...prev, email }));
Severity: Major
Found in components/signup/index.tsx and 7 other locations - About 2 hrs to fix
components/signup/index.tsx on lines 105..112
components/signup/index.tsx on lines 121..128
components/signup/index.tsx on lines 149..156
components/users/dialog.tsx on lines 83..90
components/users/dialog.tsx on lines 91..98
components/users/dialog.tsx on lines 99..106
components/users/dialog.tsx on lines 127..134

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 86.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      Array(24)
        .fill(null)
        .map((_, hour) => (
          <div key={nanoid()} className={styles.timeWrapper}>
            <span className={styles.timeLabel}>
Severity: Major
Found in components/availability-select/index.tsx and 1 other location - About 2 hrs to fix
components/calendar/components.tsx on lines 40..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 86.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        {ROWS.map((_, hour) => (
          <div key={nanoid()} className={styles.timeWrapper}>
            <span className={styles.timeLabel}>
              {getDateWithTime(hour).toLocaleString(locale, {
                hour: '2-digit',
Severity: Major
Found in components/calendar/components.tsx and 1 other location - About 2 hrs to fix
components/availability-select/index.tsx on lines 210..220

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 86.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function ChevronRight(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/chevron-right.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function AddBox(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/add-box.tsx and 13 other locations - About 2 hrs to fix
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function ContactSupport(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/contact-support.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Add(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/add.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Email(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/email.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function ChevronLeft(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/chevron-left.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Delete(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/delete.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Edit(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/edit.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function FilterList(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/filter-list.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Download(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/download.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function OpenInNew(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/open-in-new.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Close(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/close.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function EventNote(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/event-note.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13
components/icons/search.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 14 locations. Consider refactoring.
Open

export default function Search(): JSX.Element {
  return (
    <svg
      xmlns='http://www.w3.org/2000/svg'
      height='24'
Severity: Major
Found in components/icons/search.tsx and 13 other locations - About 2 hrs to fix
components/icons/add-box.tsx on lines 1..13
components/icons/add.tsx on lines 1..13
components/icons/chevron-left.tsx on lines 1..13
components/icons/chevron-right.tsx on lines 1..13
components/icons/close.tsx on lines 1..13
components/icons/contact-support.tsx on lines 1..13
components/icons/delete.tsx on lines 1..13
components/icons/download.tsx on lines 1..13
components/icons/edit.tsx on lines 1..13
components/icons/email.tsx on lines 1..13
components/icons/event-note.tsx on lines 1..13
components/icons/filter-list.tsx on lines 1..13
components/icons/open-in-new.tsx on lines 1..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  useEffect(() => {
    if (!org) return;
    setUser((prev) => {
      const orgs = new Set(prev.orgs);
      orgs.add(org.id);
Severity: Major
Found in components/signup/index.tsx and 1 other location - About 2 hrs to fix
components/users/dialog.tsx on lines 74..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

              <Link href={`/${org?.id || 'default'}/search`}>
                <a>
                  <Button
                    className={styles.btn}
                    label={t('home:search')}
Severity: Major
Found in components/home/index.tsx and 1 other location - About 2 hrs to fix
components/home/index.tsx on lines 100..109

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 85.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language