|
8 | 8 |
|
9 | 9 | import { createColumnHelper } from '@tanstack/react-table'
|
10 | 10 | import { useCallback, useMemo, useState } from 'react'
|
11 |
| -import { Link, Outlet, type LoaderFunctionArgs } from 'react-router-dom' |
| 11 | +import { Outlet, type LoaderFunctionArgs } from 'react-router-dom' |
12 | 12 |
|
13 | 13 | import {
|
14 | 14 | apiQueryClient,
|
@@ -36,12 +36,12 @@ import { LinkCell } from '~/table/cells/LinkCell'
|
36 | 36 | import { useColsWithActions, type MenuAction } from '~/table/columns/action-col'
|
37 | 37 | import { Columns } from '~/table/columns/common'
|
38 | 38 | import { PAGE_SIZE, useQueryTable } from '~/table/QueryTable'
|
39 |
| -import { buttonStyle } from '~/ui/lib/Button' |
| 39 | +import { CreateButton, CreateLink } from '~/ui/lib/CreateButton' |
40 | 40 | import { EmptyMessage } from '~/ui/lib/EmptyMessage'
|
41 | 41 | import { Message } from '~/ui/lib/Message'
|
42 | 42 | import { Modal } from '~/ui/lib/Modal'
|
43 | 43 | import { PageHeader, PageTitle } from '~/ui/lib/PageHeader'
|
44 |
| -import { TableControls, TableControlsButton, TableControlsText } from '~/ui/lib/Table' |
| 44 | +import { TableControls, TableControlsText } from '~/ui/lib/Table' |
45 | 45 | import { Tabs } from '~/ui/lib/Tabs'
|
46 | 46 | import { links } from '~/util/links'
|
47 | 47 | import { pb } from '~/util/path-builder'
|
@@ -192,9 +192,7 @@ function IpRangesTable() {
|
192 | 192 | return (
|
193 | 193 | <>
|
194 | 194 | <div className="mb-3 flex justify-end space-x-2">
|
195 |
| - <Link to={pb.ipPoolRangeAdd({ pool })} className={buttonStyle({ size: 'sm' })}> |
196 |
| - Add range |
197 |
| - </Link> |
| 195 | + <CreateLink to={pb.ipPoolRangeAdd({ pool })}>Add range</CreateLink> |
198 | 196 | </div>
|
199 | 197 | <Table columns={columns} emptyState={emptyState} />
|
200 | 198 | </>
|
@@ -286,9 +284,7 @@ function LinkedSilosTable() {
|
286 | 284 | learn more about{' '}
|
287 | 285 | <ExternalLink href={links.ipPoolsDocs}>managing IP pools</ExternalLink>.
|
288 | 286 | </TableControlsText>
|
289 |
| - <TableControlsButton onClick={() => setShowLinkModal(true)}> |
290 |
| - Link silo |
291 |
| - </TableControlsButton> |
| 287 | + <CreateButton onClick={() => setShowLinkModal(true)}>Link silo</CreateButton> |
292 | 288 | </TableControls>
|
293 | 289 | <Table columns={columns} emptyState={emptyState} />
|
294 | 290 | {showLinkModal && <LinkSiloModal onDismiss={() => setShowLinkModal(false)} />}
|
|
0 commit comments