11'use client'
22
33import { type MouseEvent , memo , type ReactNode , type TouchEvent , useMemo , useState } from 'react'
4- import { Favicon } from '@/components/favicon'
54import type { SimLink } from '@/lib/api/contracts/sim-links'
65import { simLinkOrigin } from '@/lib/sim-links/validation'
76import { QueryBoundary } from '@/platform/design-system/components'
@@ -18,6 +17,7 @@ import { ActionMenu, ContextActionMenu } from '@/platform/design-system/componen
1817import { ConfirmDialog } from '@/platform/design-system/components/modal/confirm-dialog'
1918import { OverflowText } from '@/platform/design-system/components/overflow-text/overflow-text'
2019import type { LoadMoreState } from '@/platform/design-system/components/scroll-area/use-load-more'
20+ import { SiteMark } from '@/platform/embedded/app/(shell)/_components/site-mark/site-mark'
2121import { LinkEditor } from '@/platform/embedded/app/(shell)/links/_components/links-page/link-editor'
2222import { LinksFrame } from '@/platform/embedded/app/(shell)/links/_components/links-page/links-frame'
2323import styles from '@/platform/embedded/app/(shell)/links/_components/links-page/links-page.module.css'
@@ -105,22 +105,6 @@ function LinkRowContextMenu({ links, children, ...actions }: LinkRowContextMenuP
105105 )
106106}
107107
108- /** Holds the favicon's box with the globe until the image paints, so a row never shows a gap. */
109- function LinkMark ( { host } : { host : string | null } ) {
110- const [ loaded , setLoaded ] = useState ( false )
111- return (
112- < span className = { styles . nameLeading } >
113- { ! loaded && < Icon name = 'I041' /> }
114- < Favicon
115- host = { host }
116- fallback = { null }
117- className = { styles . favicon }
118- onLoad = { ( ) => setLoaded ( true ) }
119- />
120- </ span >
121- )
122- }
123-
124108interface LinkSummaryProps {
125109 link : SimLink
126110 updated : string
@@ -173,7 +157,11 @@ const LinksTable = memo(function LinksTable({
173157 cells : {
174158 name : (
175159 < TableLabel
176- leading = { < LinkMark key = { origin } host = { origin ? new URL ( origin ) . hostname : null } /> }
160+ leading = {
161+ < span className = { styles . nameLeading } >
162+ < SiteMark key = { origin } host = { origin ? new URL ( origin ) . hostname : null } />
163+ </ span >
164+ }
177165 >
178166 < span className = { styles . nameCell } >
179167 < OverflowText text = { link . name } > { link . name } </ OverflowText >
0 commit comments