Skip to content

Commit

Permalink
Update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou authored Aug 28, 2023
1 parent 4485b21 commit 2953e37
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/note/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const UserStateContext = createContext<{
mode: 'edit',
isView: true,
})


export default function(props: Props){
const [mode, setMode] = useState<"edit" | "play">("edit")
Expand Down Expand Up @@ -75,9 +74,12 @@ export default function(props: Props){
isView,
}}>
{
noteElements.map((noteElement, index) => <div key={index} className=''>
{ noteElement }
</div>)
noteElements.map((noteElement, index) => {
noteElement.props.index = index
return <div key={index} className=''>
{ noteElement }
</div>
})
}
</UserStateContext.Provider>
</div>
Expand Down

0 comments on commit 2953e37

Please sign in to comment.