Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix browser console err #111

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Body = React.memo(() => {
return (
<TableBody>
{nodeIdList.map((nodeId) => (
<TableRowOfFunction nodeId={nodeId} />
<TableRowOfFunction key={nodeId} nodeId={nodeId} />
))}
</TableBody>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const AlgoArgs = React.memo<{
? algoArgs
.filter((info) => info.type !== 'params')
.map((algoInfo, i) => {
return <ArgHandle algoInfo={algoInfo} i={i} nodeId={nodeId} />
return <ArgHandle key={`${nodeId}_args_${i.toFixed()}`} algoInfo={algoInfo} i={i} nodeId={nodeId} />
})
: null}
</>
Expand All @@ -182,7 +182,7 @@ const AlgoReturns = React.memo<{
<>
{algoReturns != null ? (
algoReturns?.map((algoInfo, i) => {
return <ReturnHandle algoInfo={algoInfo} i={i} nodeId={nodeId} />
return <ReturnHandle key={`${nodeId}_returns_${i.toFixed()}`} algoInfo={algoInfo} i={i} nodeId={nodeId} />
})
) : (
// algoReturns.lengthが0の場合の応急処置
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Workspace/FlowChart/TreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ const AddButton = React.memo<{
}>(({ name, onClick }) => {
return (
<>
<IconButton aria-label="add" style={{ padding: 2 }} size="large">
<AddIcon onClick={() => onClick()} />
<IconButton aria-label="add" style={{ padding: 2 }} size="large" onClick={onClick}>
<AddIcon />
</IconButton>
<Typography
variant="inherit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const FilePathSelect: React.FC<{
}
})
algorithmNodeOutputPathInfoList.forEach((pathInfo) => {
menuItemList.push(<ListSubheader>{pathInfo.nodeName}</ListSubheader>)
menuItemList.push(<ListSubheader key={pathInfo.nodeName}>{pathInfo.nodeName}</ListSubheader>)
pathInfo.paths.forEach((outputPath, i) => {
menuItemList.push(
<MenuItem
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Workspace/Visualize/FlexItemList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export const FlexItemList: React.FC = () => {
const layout = useSelector(selectVisualizeItemLayout, twoDimarrayEqualityFn)
return (
<Box display="flex" flexWrap="wrap" flexDirection="column" p={1} m={1}>
{layout.map((row) => (
<Box display="flex" flexDirection="row">
{layout.map((row, row_idx) => (
<Box key={`flex_item_box_${row_idx.toFixed()}`} display="flex" flexDirection="row">
{row.map((itemId) => (
<VisualizeItem itemId={itemId} key={itemId} />
<VisualizeItem itemId={itemId} key={`visualize_item_${itemId.toFixed()}`} />
))}
</Box>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const VisualizeItemAddButton: React.FC = () => {
dispatch(pushInitialItemToNewRow())
}
return (
<StyledPaper elevation={1} variant="outlined">
<StyledPaper elevation={0} variant="outlined">
<Box
display="flex"
justifyContent="center"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/ParamFormItemCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function createParamFormItemComponent({
<AccordionDetails>
<div>
{Object.entries(param.children).map(([paramKey, param], i) => (
<ParamItem param={param} paramKey={paramKey} />
<ParamItem key={paramKey} param={param} paramKey={paramKey} />
))}
</div>
</AccordionDetails>
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
import reportWebVitals from './reportWebVitals'
import { Provider } from 'react-redux'
import { store } from 'store/store'

import { createRoot } from 'react-dom/client'
import { ThemeProvider } from '@mui/material/styles'
import { theme } from './Theme'

ReactDOM.render(
const root = createRoot(document.getElementById('root')!)

root.render(
<React.StrictMode>
<Provider store={store}>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</Provider>
</React.StrictMode>,
document.getElementById('root'),
</React.StrictMode>
)

// If you want to start measuring performance in your app, pass a function
Expand Down