chore: remove redundant comments in ClipboardHistory components for cleaner code readability
This commit is contained in:
parent
618ba3ae02
commit
9ba408d45e
@ -258,7 +258,6 @@ export function ClipboardHistoryQuickPasteRowComponent({
|
||||
const isNowItem = index === 0 && clipboard.updatedAt > Date.now() - MINUTE_IN_MS
|
||||
const isMp3 = clipboard?.isLink && clipboard?.value?.endsWith('.mp3')
|
||||
|
||||
// Recalculate preview with custom line limit if provided
|
||||
const { valuePreview, valueMorePreviewLines, valueMorePreviewChars } = useMemo(() => {
|
||||
if (historyPreviewLineLimit && historyPreviewLineLimit > 0 && clipboard?.value) {
|
||||
const result = getValuePreview(
|
||||
@ -268,14 +267,13 @@ export function ClipboardHistoryQuickPasteRowComponent({
|
||||
historyPreviewLineLimit,
|
||||
true
|
||||
)
|
||||
// console.log('result', result)
|
||||
return {
|
||||
valuePreview: result.valuePreview,
|
||||
valueMorePreviewLines: result.morePreviewLines,
|
||||
valueMorePreviewChars: result.morePreviewChars,
|
||||
}
|
||||
}
|
||||
// Use default preview from backend
|
||||
|
||||
return {
|
||||
valuePreview: clipboard?.valuePreview || '',
|
||||
valueMorePreviewLines: clipboard?.valueMorePreviewLines || null,
|
||||
|
@ -289,7 +289,6 @@ export function ClipboardHistoryRowComponent({
|
||||
const isNowItem = index === 0 && clipboard.updatedAt > Date.now() - MINUTE_IN_MS
|
||||
const isMp3 = clipboard?.isLink && clipboard?.value?.endsWith('.mp3')
|
||||
|
||||
// Recalculate preview with custom line limit if provided
|
||||
const { valuePreview, valueMorePreviewLines, valueMorePreviewChars } = useMemo(() => {
|
||||
if (historyPreviewLineLimit && historyPreviewLineLimit > 0 && clipboard?.value) {
|
||||
const result = getValuePreview(
|
||||
@ -305,7 +304,6 @@ export function ClipboardHistoryRowComponent({
|
||||
valueMorePreviewChars: result.morePreviewChars,
|
||||
}
|
||||
}
|
||||
// Use default preview from backend
|
||||
return {
|
||||
valuePreview: clipboard?.valuePreview || '',
|
||||
valueMorePreviewLines: clipboard?.valueMorePreviewLines || null,
|
||||
|
Loading…
x
Reference in New Issue
Block a user