client/app/bundles/course/leaderboard/components/tables/LeaderboardTable.tsx
Function LeaderboardTable
has 321 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LeaderboardTable: FC<Props> = (props: Props) => {
const { data, id: tableType } = props;
const tabletView = useMedia.MinWidth('sm');
const phoneView = useMedia.MinWidth('xs');
const [maxAvatars, setMaxAvatars] = useState(6);
- Create a ticketCreate a ticket
Function addGroup
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addGroup = (): void => {
const groupData = data as
| GroupLeaderboardPoints[]
| GroupLeaderboardAchievement[];
columns.push(
- Create a ticketCreate a ticket
Function addAchievements
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addAchievements = (): void => {
const achievementData = data as LeaderboardAchievement[];
columns.push({
name: 'achievements',
label: 'Achievements',
- Create a ticketCreate a ticket
Function addIndividual
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addIndividual = (): void => {
const individualData = data as
| LeaderboardPoints[]
| LeaderboardAchievement[];
columns.push({
- Create a ticketCreate a ticket
Function addPoints
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addPoints = (): void => {
const pointData = data as LeaderboardPoints[];
columns.push(
{
name: 'level',
- Create a ticketCreate a ticket