-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from Nexters/feat/cast-info-mobile
feat: 출연진 등록 모바일 대응 및 공연 등록 웹뷰 관련 이슈 수정
- Loading branch information
Showing
25 changed files
with
594 additions
and
400 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
35 changes: 18 additions & 17 deletions
35
apps/admin/src/components/ShowCastInfoFormDialogContent/DraggableShowCastInfoMemberRow.tsx
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 |
---|---|---|
@@ -1,30 +1,31 @@ | ||
import { useSortable } from "@dnd-kit/sortable"; | ||
import { useSortable } from '@dnd-kit/sortable'; | ||
import { CSS } from '@dnd-kit/utilities'; | ||
import ShowCastInfoMemberRow, { ShowCastInfoMemberRowProps } from "./ShowCastInfoMemberRow"; | ||
import ShowCastInfoMemberRow, { ShowCastInfoMemberRowProps } from './ShowCastInfoMemberRow'; | ||
|
||
interface DraggableShowCastInfoMemberRowProps extends ShowCastInfoMemberRowProps { | ||
id: string | ||
id: string; | ||
} | ||
|
||
const DraggableShowCastInfoMemberRow = ({ id, ...props }: DraggableShowCastInfoMemberRowProps) => { | ||
const { | ||
attributes, | ||
listeners, | ||
setNodeRef, | ||
transform, | ||
transition, | ||
isDragging | ||
} = useSortable({ id }); | ||
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ | ||
id, | ||
}); | ||
|
||
const style = { | ||
transform: CSS.Translate.toString(transform), | ||
transition, | ||
opacity: isDragging ? 0 : 1 | ||
opacity: isDragging ? 0 : 1, | ||
}; | ||
|
||
return ( | ||
<ShowCastInfoMemberRow {...props} ref={setNodeRef} draggingStyle={style} {...attributes} {...listeners} /> | ||
) | ||
} | ||
<ShowCastInfoMemberRow | ||
{...props} | ||
ref={setNodeRef} | ||
draggingStyle={style} | ||
{...attributes} | ||
{...listeners} | ||
/> | ||
); | ||
}; | ||
|
||
export default DraggableShowCastInfoMemberRow | ||
export default DraggableShowCastInfoMemberRow; |
Oops, something went wrong.