From eb4f380fd586df66d535de64310a72d289074ef9 Mon Sep 17 00:00:00 2001 From: devjoaov Date: Mon, 29 Apr 2024 09:26:13 -0300 Subject: [PATCH] chore: add external link option to datatable --- src/components/DataTable/SWRDataTable/index.tsx | 12 ++++++++++++ src/locales/en/translation.json | 1 + src/locales/pt-BR/translation.json | 1 + 3 files changed, 14 insertions(+) diff --git a/src/components/DataTable/SWRDataTable/index.tsx b/src/components/DataTable/SWRDataTable/index.tsx index 46eb433..f501629 100644 --- a/src/components/DataTable/SWRDataTable/index.tsx +++ b/src/components/DataTable/SWRDataTable/index.tsx @@ -139,6 +139,18 @@ export const renderDataTableCell = ({ filters, column, row, selectedRows }) => { ); case "select": return value; + case "external_link": + return ( + + Open  + {column.columnDef.title} + + ); default: return null; } diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 56ed497..940f613 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -16,6 +16,7 @@ "This action cannot be undone": "This action cannot be undone.", "Cancel": "Cancel", "Confirm": "Confirm", + "Open": "Open", "Something went wrong!": "Something went wrong!", "Pick a date": "Pick a date", "Click to Upload": "Click to Upload", diff --git a/src/locales/pt-BR/translation.json b/src/locales/pt-BR/translation.json index 915f24d..665da0b 100644 --- a/src/locales/pt-BR/translation.json +++ b/src/locales/pt-BR/translation.json @@ -16,6 +16,7 @@ "This action cannot be undone.": "Esta ação não pode ser desfeita.", "Cancel": "Cancelar", "Confirm": "Confirmar", + "Open": "Abrir", "Something went wrong!": "Algo deu errado!", "Pick a date": "Escolha uma data", "Click to Upload": "Clique para fazer upload",