Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qq8244353 committed Nov 23, 2023
1 parent a7d3d2d commit 37c4144
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/pages/Ridaisai2023/Kyopro/DraggableList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export const DraggableList: React.FC<Props> = (props) => {
return (
<DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId="list" direction="horizontal">
{(provided, snapshot) => (
{(provided) => (
<List ref={provided.innerRef}>
{list.Current.map((elem, index) => (
<Draggable key={elem.toString()} draggableId={elem.toString()} index={index}>
{(provided, snapshot) => (
{(provided) => (
<Elem ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}>
{elem}
</Elem>
Expand Down
19 changes: 6 additions & 13 deletions src/pages/Ridaisai2023/Kyopro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function shuffle(array: number[]) {
return array
}

function getRandomInt(max) {
function getRandomInt(max: number) {
return Math.floor(Math.random() * max)
}

Expand Down Expand Up @@ -75,12 +75,14 @@ const Button = styled.button`
cursor: pointer;
margin: 0 0 2em 0;
`

const DisplayList = (props) => {
type Props = {
list: number[]
}
const DisplayList = (props: Props) => {
const { list } = props
return (
<List>
{list.map((elem) => (
{list.map((elem: number) => (
<Elem>{elem}</Elem>
))}
</List>
Expand Down Expand Up @@ -214,15 +216,6 @@ const Elem = styled.span`
border-radius: 5px;
`

const Gamen = styled.div`
background: rgb(43, 135, 209);
position: relative;
color: white;
user-select: none;
overflow: hidden;
text-align: center;
`

const Description = styled.div`
font-family: 'Yu Gothic', sans-serif;
margin: 0 3%;
Expand Down

0 comments on commit 37c4144

Please sign in to comment.