-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade eslint and typescript
Ben Willenbring
committed
Jan 16, 2024
1 parent
7679011
commit bdf2a28
Showing
20 changed files
with
2,752 additions
and
2,143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ build/ | |
dist/ | ||
coverage/ | ||
cache | ||
.nx | ||
.nx | ||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import { Box, BoxProps } from "@mui/material"; | ||
import React from "react"; | ||
import React, { Ref } from "react"; | ||
|
||
interface FlexBoxProps extends BoxProps { | ||
children?: React.ReactNode; | ||
} | ||
|
||
export const FlexBox = React.forwardRef(({ children, ...props }: FlexBoxProps, ref: any) => { | ||
return ( | ||
<Box {...props} ref={ref} display="flex"> | ||
{children} | ||
</Box> | ||
); | ||
}); | ||
export const FlexBox = React.forwardRef( | ||
({ children, ...props }: FlexBoxProps, ref: Ref<HTMLElement>) => { | ||
return ( | ||
<Box {...props} ref={ref} display="flex"> | ||
{children} | ||
</Box> | ||
); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 23 additions & 21 deletions
44
packages/frontend/src/poker/components/buttons/EstimationUnitSetupMenuItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
import React from "react"; | ||
import React, { Ref, PropsWithChildren } from "react"; | ||
import { Build } from "@mui/icons-material"; | ||
import { ListItemIcon, ListItemText, MenuItem } from "@mui/material"; | ||
import { useUserContext } from "../../../common/context/UserContext"; | ||
import { isModerator } from "../../../common/utils/participantsUtils"; | ||
import { EstimationUnitSetupDialog } from "../dialogs/EstimationUnitSetupDialog"; | ||
import { useDialog } from "../../../common/hooks/useDialog"; | ||
|
||
export const EstimationUnitSetupMenuItem = React.forwardRef((_props: any, ref: any) => { | ||
const { user } = useUserContext(); | ||
const { isOpen, closeDialog, openDialog } = useDialog(false); | ||
export const EstimationUnitSetupMenuItem = React.forwardRef( | ||
(_: PropsWithChildren, ref: Ref<HTMLLIElement>) => { | ||
const { user } = useUserContext(); | ||
const { isOpen, closeDialog, openDialog } = useDialog(false); | ||
|
||
return ( | ||
<> | ||
<MenuItem | ||
ref={ref} | ||
aria-label="Change Poker Unit" | ||
onClick={openDialog} | ||
disabled={!isModerator(user)} | ||
> | ||
<ListItemIcon> | ||
<Build fontSize="small" /> | ||
</ListItemIcon> | ||
<ListItemText primary="Change Poker Unit" /> | ||
</MenuItem> | ||
<EstimationUnitSetupDialog close={closeDialog} isOpen={isOpen} /> | ||
</> | ||
); | ||
}); | ||
return ( | ||
<> | ||
<MenuItem | ||
ref={ref} | ||
aria-label="Change Poker Unit" | ||
onClick={openDialog} | ||
disabled={!isModerator(user)} | ||
> | ||
<ListItemIcon> | ||
<Build fontSize="small" /> | ||
</ListItemIcon> | ||
<ListItemText primary="Change Poker Unit" /> | ||
</MenuItem> | ||
<EstimationUnitSetupDialog close={closeDialog} isOpen={isOpen} /> | ||
</> | ||
); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters