-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plots error message below ribbon (#5165)
- Loading branch information
Showing
17 changed files
with
385 additions
and
26 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react' | ||
import { useSelector } from 'react-redux' | ||
import styles from './styles.module.scss' | ||
import { Error } from '../../shared/components/icons' | ||
import { PlotsState } from '../store' | ||
import { useModalOpenClass } from '../hooks/useModalOpenClass' | ||
|
||
export const ErrorsModal: React.FC = () => { | ||
const errors = useSelector((state: PlotsState) => state.webview.plotErrors) | ||
useModalOpenClass() | ||
|
||
return ( | ||
<div className={styles.errorsModal} data-testid="errors-modal"> | ||
<h3 className={styles.errorsModalTitle}> | ||
<Error className={styles.errorsModalIcon} width="20" height="20" /> | ||
Errors | ||
</h3> | ||
<table> | ||
<tbody> | ||
{errors.map(({ path, revs }) => ( | ||
<React.Fragment key={path}> | ||
<tr> | ||
<th colSpan={2} className={styles.errorsModalPlot}> | ||
{path} | ||
</th> | ||
</tr> | ||
{revs.map(({ rev, msg }) => ( | ||
<tr key={`${rev}-${msg}`}> | ||
<td className={styles.errorsModalRev}>{rev}</td> | ||
<td className={styles.errorsModalMsgs}>{msg}</td> | ||
</tr> | ||
))} | ||
</React.Fragment> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
) | ||
} |
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
Oops, something went wrong.