소스 검색

button-for-code-move

kazutoweseek 1 년 전
부모
커밋
92d3ce6dc0
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      apps/app/src/client/components/Admin/UserGroup/UserGroupTable.tsx

+ 3 - 3
apps/app/src/client/components/Admin/UserGroup/UserGroupTable.tsx

@@ -136,17 +136,17 @@ export const UserGroupTable: FC<Props> = ({
     setGroupIdToUsersMap(generateGroupIdToUsersMap(userGroupRelations));
     setGroupIdToChildGroupsMap(generateGroupIdToChildGroupsMap(childUserGroups));
   }, [userGroupRelations, childUserGroups]);
-  const ButtonForUserGroupTable = () => {
+  const [hoveredindex, setHoveredIdex] = useState<undefined | number>(undefined);
+  const ButtonForUserGroupedit = (index) => {
     return (
       <button
         className="btn btn-link btn-edit-groups text-secondary py-0"
         type="button"
       >
-        <span className="material-symbols-outlined px-2 py-0 ">edit</span>
+        <span className={`material-symbols-outlined px-2 py-0 ${hoveredindex === index ? '' : 'opacity-0'}`}>edit</span>
       </button>
     );
   };
-  const [hoveredindex, setHoveredIdex] = useState<undefined | number>(undefined);
 
   return (
     <div data-testid="grw-user-group-table" className="mb-5">