@@ -120,95 +120,6 @@ export const LinkShortener: React.FC = () => {
120120 ) ;
121121 } ;
122122
123- const renderDelegatedLinks = ( link : LinkryGetResponse , index : number ) => {
124- const shouldShow = true ;
125-
126- return (
127- < Transition
128- mounted = { shouldShow }
129- transition = "fade"
130- duration = { 400 }
131- timingFunction = "ease"
132- >
133- { ( styles ) => (
134- < tr
135- style = { {
136- ...styles ,
137- display : shouldShow ? "table-row" : "none" ,
138- backgroundColor : index % 2 === 0 ? "#f0f8ff" : "#ffffff" ,
139- } }
140- >
141- < Table . Td style = { wrapTextStyle } >
142- < Anchor
143- href = { `http://localhost:8080/api/v1/linkry/redir/${ link . slug } ` }
144- target = "_blank"
145- >
146- { " " }
147- { /* Currently set to localhost for local testing purposes */ }
148- https://go.acm.illinois.edu/{ link . slug }
149- </ Anchor >
150- </ Table . Td >
151- < Table . Td style = { wrapTextStyle } >
152- < Anchor
153- href = { `/api/v1/linkry/redir/${ link . slug } ` }
154- target = "_blank"
155- >
156- { link . redirect }
157- </ Anchor >
158- </ Table . Td >
159- < Table . Td style = { wrapTextStyle } >
160- { link . access . map ( ( group , index ) => (
161- < Badge
162- key = { index }
163- color = "#999898"
164- radius = "sm"
165- style = { { marginRight : "2px" , marginBottom : "2px" } }
166- >
167- { group . trim ( ) } { /* Trim any extra whitespace */ }
168- </ Badge >
169- ) ) }
170- </ Table . Td >
171- { /* <Table.Td style={wrapTextStyle}>{dayjs(link.createdAt).format('MMM D YYYY hh:mm')}</Table.Td>
172- <Table.Td style={wrapTextStyle}>{dayjs(link.updatedAt).format('MMM D YYYY hh:mm')}</Table.Td> */ }
173- < Table . Td
174- style = { {
175- textAlign : "center" ,
176- display : "flex" ,
177- justifyContent : "center" ,
178- alignItems : "center" ,
179- } }
180- >
181- < ButtonGroup >
182- { /* <Button component="a" href={`/linkry/edit/${link.id}`}>
183- Edit
184- </Button> */ }
185- < Button
186- component = "a"
187- href = {
188- link . slug
189- ? `/linkry/edit/${ encodeURIComponent ( link . slug ) } ?previousPage=${ window . location . pathname } `
190- : "#"
191- }
192- >
193- < IconEdit size = { 16 } />
194- </ Button >
195- < Button
196- color = "red"
197- onClick = { ( ) => {
198- setDeleteLinkCandidate ( link ) ;
199- open ( ) ;
200- } }
201- >
202- < IconTrash size = { 16 } />
203- </ Button >
204- </ ButtonGroup >
205- </ Table . Td >
206- </ tr >
207- ) }
208- </ Transition >
209- ) ;
210- } ;
211-
212123 useEffect ( ( ) => {
213124 const getEvents = async ( ) => {
214125 setIsLoading ( true ) ;
0 commit comments