Fix paste text

This commit is contained in:
Joshen Lim committed 2023-04-04 14:50:01 +08:00
1 parent 438a939091
commit eb127e89ea
4 files changed
+12 -7

No files matched your search

@@ -28,7 +28,7 @@ export function TicketBrickWallSlider({ users, reverse, speed = 10000 }: Props)
}/${BUCKET_FOLDER_VERSION}/${username}.png`
useEffect(() => {
// trigger autplay if viewport resize
// trigger autoplay if viewport resize
if (swiperInstance) swiperInstance?.autoplay?.run()
}, [width])
@@ -425,16 +425,16 @@ const SidePanelEditor = ({
})
resolve()
} else {
ui.setNotification({
id: toastId,
category: 'success',
message: `Successfully imported ${rowCount} rows of data into ${selectedTable.name}`,
})
await Promise.all([
queryClient.invalidateQueries(
sqlKeys.query(project?.ref, [selectedTable!.schema, selectedTable!.name])
),
])
ui.setNotification({
id: toastId,
category: 'success',
message: `Successfully imported ${rowCount} rows of data into ${selectedTable.name}`,
})
resolve()
closePanel()
}
@@ -121,6 +121,7 @@ const SpreadsheetImport: FC<Props> = ({
})
}
setErrors(errors)
setSelectedHeaders(headers)
setSpreadsheetData({ headers, rows, rowCount: rows.length, columnTypeMap })
} else {
setSpreadsheetData(EMPTY_SPREADSHEET_DATA)
@@ -134,7 +134,11 @@ const SpreadsheetImportPreview = ({
</div>
<p className="text-sm">
This CSV <span className="text-red-900">cannot</span> be imported into your
table due to incompatible headers: {incompatibleHeaders.join(', ')}
table due to incompatible headers:
<br />
The column{incompatibleHeaders.length > 1 ? 's' : ''}{' '}
{incompatibleHeaders.map((x) => `"${x}"`).join(', ')}{' '}
{incompatibleHeaders.length > 1 ? 'are' : 'is'} not present in your table
</p>
</div>
</div>