gwcuva/gwc-website

View on GitHub

Showing 372 of 372 total issues

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

function MobileHeader(props: Props) {
    const [header, setHeader] = useState({'year': 2023, 'month': '', 'day': '', 'format': '', 'registration': '', 'time': ''});

  useEffect(() => {
    const fetchHeader = async () => {
Severity: Major
Found in src/components/CareerFair2023/Header/MobileHeader.tsx and 2 other locations - About 3 days to fix
src/components/CareerFair2022/Header/MobileHeader.tsx on lines 10..68
src/components/CareerFair2024/Header/MobileHeader.tsx on lines 10..69

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 608.

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

function About() {
  const [description, setDescription] = useState([{'id': '', 'ghhDescription': '', 'gwcDescription': ''}]);
  let ghhDescription: string[] = [];
  let gwcDescription: string[] = [];
  
Severity: Major
Found in src/components/GirlsHooHack2022/About/About.tsx and 1 other location - About 3 days to fix
src/components/GirlsHooHack2023/About/About.tsx on lines 6..65

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 606.

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

function About() {
  const [description, setDescription] = useState([{'id': '', 'ghhDescription': '', 'gwcDescription': ''}]);
  let ghhDescription: string[] = [];
  let gwcDescription: string[] = [];
  
Severity: Major
Found in src/components/GirlsHooHack2023/About/About.tsx and 1 other location - About 3 days to fix
src/components/GirlsHooHack2022/About/About.tsx on lines 6..65

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 606.

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

function Newsletter() {
    const emailInput = useRef<HTMLInputElement>(null);
    const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
    const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
    const graphQLClient = new GraphQLClient(endpoint, {
Severity: Major
Found in src/components/GirlsHooHack2023/Newsletter/Newsletter.tsx and 1 other location - About 3 days to fix
src/components/GirlsHooHack2022/Newsletter/Newsletter.tsx on lines 6..61

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 558.

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

function Newsletter() {
    const emailInput = useRef<HTMLInputElement>(null);
    const endpoint = process.env.REACT_APP_GRAPHCMS_URL ? process.env.REACT_APP_GRAPHCMS_URL : "";
    const graphcmsToken = process.env.REACT_APP_GRAPHCMS_TOKEN ? process.env.REACT_APP_GRAPHCMS_TOKEN : "";
    const graphQLClient = new GraphQLClient(endpoint, {
Severity: Major
Found in src/components/GirlsHooHack2022/Newsletter/Newsletter.tsx and 1 other location - About 3 days to fix
src/components/GirlsHooHack2023/Newsletter/Newsletter.tsx on lines 6..61

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 558.

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

  events.sort(function(a, b) {
    let atime = a.startTime.toLowerCase();
    let btime = b.startTime.toLowerCase();
    if(atime.includes("am") && btime.includes("pm")) {
      return -1;
Severity: Major
Found in src/components/GirlsHooHack2022/Schedule/Schedule.tsx and 1 other location - About 2 days to fix
src/components/GirlsHooHack2023/Schedule/Schedule.tsx on lines 66..104

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 459.

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

  events.sort(function(a, b) {
    let atime = a.startTime.toLowerCase();
    let btime = b.startTime.toLowerCase();
    if(atime.includes("am") && btime.includes("pm")) {
      return -1;
Severity: Major
Found in src/components/GirlsHooHack2023/Schedule/Schedule.tsx and 1 other location - About 2 days to fix
src/components/GirlsHooHack2022/Schedule/Schedule.tsx on lines 66..104

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 459.

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 6 locations. Consider refactoring.
Open

function PanelistItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx on lines 14..35

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 432.

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 6 locations. Consider refactoring.
Open

function KeynoteItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx on lines 14..35

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 432.

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 6 locations. Consider refactoring.
Open

function KeynoteItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx on lines 14..35

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 432.

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 6 locations. Consider refactoring.
Open

function PanelistItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx on lines 14..35

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 432.

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 6 locations. Consider refactoring.
Open

function KeynoteItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx on lines 14..35

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 432.

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 6 locations. Consider refactoring.
Open

function PanelistItem(props: Props): JSX.Element {
    const mem = props.mem;
    if(isMobile) {
        return (
            <a href={`https://linkedin.com/in/${mem.linkedIn}`} target="_blank" rel="noopener noreferrer">
Severity: Major
Found in src/components/GirlsHooHack2022/Speakers/PanelistItem.tsx and 5 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2021/Speakers/PanelistItem.tsx on lines 14..35
src/components/GirlsHooHack2022/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/KeynoteItem.tsx on lines 14..35
src/components/GirlsHooHack2023/Speakers/PanelistItem.tsx on lines 14..35

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 432.

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

function Schedule() {
  const [workshops, setWorkshops] = useState([{'id': '', 'eventName': '', 'eventDetail': '', 'startTime': '', 'zoomLink': '', 'inPerson': ''}]);
  // const [dropdownOpen, setDropdownOpen] = useState(false);

  useEffect(() => {
Severity: Major
Found in src/components/CareerFair2024/Schedule/Schedule.tsx and 1 other location - About 2 days to fix
src/components/CareerFair2023/Schedule/Schedule.tsx on lines 12..56

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 420.

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

function Schedule() {
  const [workshops, setWorkshops] = useState([{'id': '', 'eventName': '', 'eventDetail': '', 'startTime': '', 'zoomLink': '', 'inPerson': ''}]);
  // const [dropdownOpen, setDropdownOpen] = useState(false);

  useEffect(() => {
Severity: Major
Found in src/components/CareerFair2023/Schedule/Schedule.tsx and 1 other location - About 2 days to fix
src/components/CareerFair2024/Schedule/Schedule.tsx on lines 12..56

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 420.

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 3 locations. Consider refactoring.
Open

function PrizeItem(props: Props): JSX.Element {
    const [dropdownOpen, setDropdownOpen] = useState(false);

    if(isMobile) {
        return (
Severity: Major
Found in src/components/GirlsHooHack2023/Prizes/PrizeItem.tsx and 2 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Prizes/PrizeItem.tsx on lines 16..50
src/components/GirlsHooHack2022/Prizes/PrizeItem.tsx on lines 16..50

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 403.

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 3 locations. Consider refactoring.
Open

function PrizeItem(props: Props): JSX.Element {
    const [dropdownOpen, setDropdownOpen] = useState(false);

    if(isMobile) {
        return (
Severity: Major
Found in src/components/GirlsHooHack2022/Prizes/PrizeItem.tsx and 2 other locations - About 2 days to fix
src/components/GirlsHooHack2021/Prizes/PrizeItem.tsx on lines 16..50
src/components/GirlsHooHack2023/Prizes/PrizeItem.tsx on lines 16..50

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 403.

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 3 locations. Consider refactoring.
Open

function PrizeItem(props: Props): JSX.Element {
    const [dropdownOpen, setDropdownOpen] = useState(false);

    if(isMobile) {
        return (
Severity: Major
Found in src/components/GirlsHooHack2021/Prizes/PrizeItem.tsx and 2 other locations - About 2 days to fix
src/components/GirlsHooHack2022/Prizes/PrizeItem.tsx on lines 16..50
src/components/GirlsHooHack2023/Prizes/PrizeItem.tsx on lines 16..50

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 403.

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

  for (let i = 0; i < workshops.length; i++) {
    const secondDash = workshops[i].workshopDate.lastIndexOf('-');
    if(secondDash!== -1) {
      const year = workshops[i].workshopDate.substring(0, 4);
      const month = months[parseInt(workshops[i].workshopDate.substring(5, secondDash))-1];
Severity: Major
Found in src/components/GirlsHooHack2022/JumpStart/JumpStart.tsx and 1 other location - About 2 days to fix
src/components/GirlsHooHack2023/JumpStart/JumpStart.tsx on lines 53..88

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 376.

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

  for (let i = 0; i < workshops.length; i++) {
    const secondDash = workshops[i].workshopDate.lastIndexOf('-');
    if(secondDash!== -1) {
      const year = workshops[i].workshopDate.substring(0, 4);
      const month = months[parseInt(workshops[i].workshopDate.substring(5, secondDash))-1];
Severity: Major
Found in src/components/GirlsHooHack2023/JumpStart/JumpStart.tsx and 1 other location - About 2 days to fix
src/components/GirlsHooHack2022/JumpStart/JumpStart.tsx on lines 53..88

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 376.

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