react-brackets icon indicating copy to clipboard operation
react-brackets copied to clipboard

[Bug] when set mobileBreakpoint to 0

Open MahmoudTarekAli opened this issue 3 years ago • 2 comments

Warning: Encountered two children with the same key, `1`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version. in div (created by styled.div) in styled.div (created by SingleElimination) in div (created by styled.div) in styled.div (created by SingleElimination) in div (created by ReactSwipableView) in div (created by ReactSwipableView) in div (created by ReactSwipableView) in ReactSwipableView (created by SingleElimination) in div (created by styled.div) in styled.div (created by SingleElimination) in SingleElimination (at wining-bracket.tsx:29) in WiningBracket (at double-elimination/index.tsx:112) in div (at double-elimination/index.tsx:111) in DoubleElimination (at App.tsx:17) in div (at App.tsx:8) in App (at src/index.tsx:7)

MahmoudTarekAli avatar Oct 23 '22 00:10 MahmoudTarekAli

This Issue was only on your example I tried the library on a different project and it was just working fine. Thank you for making this lib

MahmoudTarekAli avatar Oct 23 '22 00:10 MahmoudTarekAli

It was because array.fill create two seed with the same id

    title: 'Round 2',
    seeds: [...new Array(2)].fill({
      id: 12,
      teams: [
        {id: 33, name: 'The Leons', score: 2},
        {id: 44, name: 'Kitties', score: 6},
      ],
    }),
  },```

MahmoudTarekAli avatar Oct 23 '22 00:10 MahmoudTarekAli