Skip to content

Commit

Permalink
Removed unnecessary error comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Jan 30, 2025
1 parent 5b9b96d commit ef2ad80
Show file tree
Hide file tree
Showing 17 changed files with 4 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export const DialogComponent: React.FC<DialogProps> = (props) => {
color: "#ccc",
}}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="close" />
</IconButton>
</DialogTitle>
Expand Down
2 changes: 0 additions & 2 deletions react/src/lib/components/EdsIcon/EdsIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const EdsIcon: React.FC<EdsIconProps> = (props) => {
`https://eds-storybook-react.azurewebsites.net/?path=/story/icons--preview.`
}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon
id={props.id}
data={edsIcons.report}
Expand All @@ -42,7 +41,6 @@ export const EdsIcon: React.FC<EdsIconProps> = (props) => {

return (
<>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon id={props.id} data={icon} size={props.size} color={props.color} />
</>
);
Expand Down
1 change: 0 additions & 1 deletion react/src/lib/components/Menu/components/Group/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const Group: React.FC<GroupProps> = (props) => {
: "Collapse group"
}
>
{ /* @ts-expect-error - this is a very weird bug */}
<EdsIcon
name={
!collapsed || props.forceOpen
Expand Down
2 changes: 0 additions & 2 deletions react/src/lib/components/Menu/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const Icon: React.FC<IconProps> = (props) => {
`https://eds-storybook-react.azurewebsites.net/?path=/story/icons--preview.`
}
>
{ /* @ts-expect-error - this is a very weird bug */}
<EdsIcon
data={edsIcons.report}
color="hsla(0, 100%, 50%, 1)"
Expand All @@ -39,7 +38,6 @@ export const Icon: React.FC<IconProps> = (props) => {

return (
<>
{ /* @ts-expect-error - this is a very weird bug */}
<EdsIcon
data={icon}
color={props.active ? "#FF1243" : "#989898"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ export const MenuBar = React.forwardRef<HTMLDivElement, MenuBarProps>(
variant="ghost_icon"
onClick={handleMenuButtonClick}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="menu" title="Open menu" />
</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const WebvizDialogTitle = React.forwardRef<
aria-label="close"
onClick={() => handleCloseClick()}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="close" />
</IconButton>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ const WebvizContentOverlay: React.FC<InferProps<typeof propTypes>> = ({
<div className="webviz-plugin-data-owner">
{contactPerson && "name" in contactPerson && (
<p>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="person" style={{ marginRight: "5px" }} />
{contactPerson.name}
</p>
)}
{contactPerson && "email" in contactPerson && (
<p>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="email" style={{ marginRight: "5px" }} />
<a href="mailto:{this.props.contactPerson.email}">
{contactPerson.email}
Expand All @@ -59,7 +57,6 @@ const WebvizContentOverlay: React.FC<InferProps<typeof propTypes>> = ({
)}
{contactPerson && "phone" in contactPerson && (
<p>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="call" style={{ marginRight: "5px" }} />
{contactPerson.phone}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const WebvizToolbarButton: React.FC<WebvizToolbarButtonProps> = ({
target,
}) => {
const createIcon = (useOnClick: boolean) => (
// @ts-expect-error - this is a very weird bug
<Icon
data={icon}
className={classNames({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ export const WebvizPluginTour: React.FC<WebvizPluginTourProps> = (
>
{pluginData && (
<div className="WebvizPluginTour__View">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="view_carousel" />
<span>
{pluginData.views.find(
Expand Down Expand Up @@ -314,7 +313,6 @@ export const WebvizPluginTour: React.FC<WebvizPluginTourProps> = (
}
>
Next
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="arrow_forward" />
</Button>
}
Expand All @@ -329,7 +327,6 @@ export const WebvizPluginTour: React.FC<WebvizPluginTourProps> = (
}}
disabled={currentTourStep === 0}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="arrow_back" />
Back
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const FullScreenMenu: React.FC<FullScreenMenuProps> = (
}
>
<Tooltip title={action.tooltip}>
{ /* @ts-expect-error - this is a very weird bug */}
<>{icon && <Icon data={icon} />}</>
</Tooltip>
</IconButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ export const WebvizSettingsDrawer: React.FC<WebvizSettingsDrawerProps> = (
}`}
onClick={() => handleToggleOpenClick()}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="chevron_left" />
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="settings" />
</Button>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const AuthorDialog: React.FC<AuthorDialogProps> = (
color: "#ccc",
}}
>
{ /* @ts-expect-error - this is a very weird bug */}

<Icon name="close" />
</IconButton>
</DialogTitle>
Expand All @@ -57,7 +57,7 @@ export const AuthorDialog: React.FC<AuthorDialogProps> = (
<ListItem>
<ListItemAvatar>
<Avatar>
{ /* @ts-expect-error - this is a very weird bug */}

<Icon name="person" />
</Avatar>
</ListItemAvatar>
Expand All @@ -66,7 +66,7 @@ export const AuthorDialog: React.FC<AuthorDialogProps> = (
<ListItem>
<ListItemAvatar>
<Avatar>
{ /* @ts-expect-error - this is a very weird bug */}

<Icon name="email" />
</Avatar>
</ListItemAvatar>
Expand All @@ -75,7 +75,7 @@ export const AuthorDialog: React.FC<AuthorDialogProps> = (
<ListItem>
<ListItemAvatar>
<Avatar>
{ /* @ts-expect-error - this is a very weird bug */}

<Icon name="phone" />
</Avatar>
</ListItemAvatar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={() => handleFullScreenClick()}
>
<Tooltip title="Open active plugin in fullscreen mode">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="fullscreen" />
</Tooltip>
</div>
Expand All @@ -572,7 +571,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={() => handleScreenShotClick()}
>
<Tooltip title="Take a screenshot from active plugin">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="camera" />
</Tooltip>
</div>
Expand All @@ -582,7 +580,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={handleDownloadClick}
>
<Tooltip title="Download data from active plugin">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="download" />
</Tooltip>
</div>
Expand All @@ -599,7 +596,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
badgeContent={numDeprecationWarnings}
color="primary"
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="warning_outlined" />
</Badge>
</Tooltip>
Expand All @@ -611,7 +607,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={() => setOpenAuthorDialog(true)}
>
<Tooltip title="View active plugin's author">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="person" />
</Tooltip>
</div>
Expand All @@ -622,7 +617,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={() => setTourIsOpen(true)}
>
<Tooltip title="Start a tour through the active plugin">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="help" />
</Tooltip>
</div>
Expand All @@ -633,7 +627,6 @@ export const PluginActions: React.FC<PluginActionsProps> = (
onClick={() => openInNewTab(feedbackUrl)}
>
<Tooltip title="Report issue/give feedback on the active plugin">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="comment_solid" />
</Tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export const ViewList: React.FC<ViewListProps> = (props: ViewListProps) => {
<div>
{el.views[0].id ===
props.activeViewId && (<>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="check" />
</>
)}
Expand Down Expand Up @@ -153,7 +152,6 @@ export const ViewList: React.FC<ViewListProps> = (props: ViewListProps) => {
<div>
{view.id ===
props.activeViewId && (<>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="check" />
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const ViewSelector: React.FC<ViewSelectorProps> = (
onClick={() => setMenuOpen(true)}
>
<div ref={viewCarouselRef} className="WebvizViewSelector__Icon">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="view_carousel" />
</div>
<div
Expand All @@ -165,7 +164,6 @@ export const ViewSelector: React.FC<ViewSelectorProps> = (
width: isCollapsed ? 0 : "auto",
}}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="chevron_down" />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export const WebvizSettingsGroup: React.FC<WebvizSettingsGroupProps> = (
>
{props.viewId === "" && (
<div className="WebvizSettingsGroup__GlobalIcon">
{ /* @ts-expect-error - this is a very weird bug */}
<Icon
name="world"
title="Global settings group"
Expand All @@ -162,7 +161,6 @@ export const WebvizSettingsGroup: React.FC<WebvizSettingsGroupProps> = (
{!props.alwaysOpen && (
<div>
<IconButton>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon
name={
props.open === true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ export const WebvizViewElement: React.FC<WebvizViewElementProps> = (props) => {
<IconButton
onClick={() => handleOpenSettingsDialog()}
>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="settings" size={16} />
</IconButton>
</Tooltip>
Expand All @@ -564,7 +563,6 @@ export const WebvizViewElement: React.FC<WebvizViewElementProps> = (props) => {
<div>
<Tooltip title="Download data from view element">
<IconButton onClick={() => handleDownloadClick()}>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="download" size={16} />
</IconButton>
</Tooltip>
Expand All @@ -573,15 +571,13 @@ export const WebvizViewElement: React.FC<WebvizViewElementProps> = (props) => {
<div>
<Tooltip title="Take screenshot">
<IconButton onClick={handleScreenShotClick}>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="camera" size={16} />
</IconButton>
</Tooltip>
</div>
<div>
<Tooltip title="View in fullscreen">
<IconButton onClick={handleFullScreenClick}>
{ /* @ts-expect-error - this is a very weird bug */}
<Icon name="fullscreen" size={16} />
</IconButton>
</Tooltip>
Expand Down

0 comments on commit ef2ad80

Please sign in to comment.