Skip to content

Commit 78283cf

Browse files
authored
fix: add keys to createCtas elements (coder#4362)
1 parent d165d76 commit 78283cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

site/src/components/RuntimeErrorState/createCtas.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ const ReloadAppButton = (): ReactElement => {
4848
* createCtas generates an array of buttons to be used with our error boundary UI
4949
*/
5050
export const createCtas = (codeBlock: string[]): ReactElement[] => {
51-
// REMARK: we don't have to worry about key order changing
52-
// eslint-disable-next-line react/jsx-key
53-
return [<CopyStackButton text={codeBlock.join("\r\n")} />, <ReloadAppButton />]
51+
return [
52+
<CopyStackButton key="copy-stack-btn" text={codeBlock.join("\r\n")} />,
53+
<ReloadAppButton key="reload-app-btn" />,
54+
]
5455
}
5556

5657
const useStyles = makeStyles((theme) => ({

0 commit comments

Comments
 (0)