@@ -18,8 +18,8 @@ import { PlusIcon } from "@heroicons/react/solid";
1818
1919const sortDataByRole = ( data : AddressAndRole [ ] ) : AddressAndRole [ ] => {
2020 return data . sort ( ( a , b ) => {
21- if ( a . role === "OWNER " ) return - 1 ;
22- if ( b . role === "OWNER " ) return 1 ;
21+ if ( a . role === "owner " ) return - 1 ;
22+ if ( b . role === "owner " ) return 1 ;
2323 return a . role . localeCompare ( b . role ) ;
2424 } ) ;
2525} ;
@@ -35,8 +35,8 @@ const filterRoles = (data: AddressAndRole[]): AddressAndRole[] => {
3535 // If not included, simply add the current item
3636 acc . push ( current ) ;
3737 } else if (
38- acc [ existingIndex ] . role !== "OWNER " &&
39- current . role === "OWNER "
38+ acc [ existingIndex ] . role !== "owner " &&
39+ current . role === "owner "
4040 ) {
4141 // If the existing item is not an Owner but the current is, replace it
4242 acc [ existingIndex ] = current ;
@@ -64,7 +64,7 @@ export function ViewManageProgram(props: {
6464 const isOwner = props . program ?. roles ?. some (
6565 ( role ) =>
6666 role . address . toLowerCase ( ) === props . userAddress . toLowerCase ( ) &&
67- role . role === "OWNER "
67+ role . role === "owner "
6868 ) ;
6969
7070 // Show Owner role first, then Operator
@@ -84,7 +84,7 @@ export function ViewManageProgram(props: {
8484 name : "Updating" ,
8585 description : `Updating the team members for the profile` ,
8686 status : contractUpdatingStatus ,
87- }
87+ } ,
8888 ] ;
8989
9090 const handleUpdateTeam = async ( ) => {
@@ -192,9 +192,9 @@ export function ViewManageProgram(props: {
192192 < tr key = { index } >
193193 < AddressRow address = { item . address } />
194194 < td className = "w-1/4 px-6 py-4 whitespace-nowrap text-sm text-gray-400" >
195- { item . role === "OWNER " ? "Owner" : "Member" }
195+ { item . role === "owner " ? "Owner" : "Member" }
196196 </ td >
197- { isOwner && item . role !== "OWNER " ? (
197+ { isOwner && item . role !== "owner " ? (
198198 < td >
199199 < XIcon
200200 className = "text-red-100 w-6 cursor-pointer"
@@ -205,8 +205,9 @@ export function ViewManageProgram(props: {
205205 } }
206206 />
207207 </ td >
208- ) :
209- < td className = "bg-white" > </ td > }
208+ ) : (
209+ < td className = "bg-white" > </ td >
210+ ) }
210211 </ tr >
211212 ) ) }
212213 </ tbody >
0 commit comments