diff --git a/src/App.test.jsx b/src/App.test.jsx
index 854d5f0..031d7ed 100644
--- a/src/App.test.jsx
+++ b/src/App.test.jsx
@@ -5,7 +5,7 @@ import App from './App'
import { MailReader } from './components/MailReader'
import { MailsGrid } from './components/MailsGrid'
import { MailsSummary } from './components/MailsSummary'
-import { mailService } from './service/mail'
+import { mailService } from './service/mailService'
describe('smoke test de la app', () => {
test('la app levanta', async () => {
diff --git a/src/components/MailReader.jsx b/src/components/MailReader.jsx
index 2d2ac34..664748a 100644
--- a/src/components/MailReader.jsx
+++ b/src/components/MailReader.jsx
@@ -3,7 +3,7 @@ import { InputText } from 'primereact/inputtext'
import { Panel } from 'primereact/panel'
import { useEffect, useState } from 'react'
-import { mailService } from '../service/mail'
+import { mailService } from '../service/mailService'
import { MailsGrid } from './MailsGrid'
import { MailsSummary } from './MailsSummary'
diff --git a/src/components/MailsGrid.jsx b/src/components/MailsGrid.jsx
index 6eb9fdb..acf357e 100644
--- a/src/components/MailsGrid.jsx
+++ b/src/components/MailsGrid.jsx
@@ -4,39 +4,39 @@ import { DataTable } from 'primereact/datatable'
import { Mail } from '../domain/mail'
import PropTypes from 'prop-types'
-const fechaTemplate = (mail) => {
- return (
- {mail.fechaCorta}
- )
-}
-
-const marcarComoLeidoTemplate = (alLeerMail) => (mail) => {
- return (
- mail.leido ? '' :
- )
-}
-
-const recienteTemplate = (mail) => {
- return (
- mail.esReciente() ?
-
-
- : ''
- )
-}
-
-const leidoTemplate = ({ id, leido }) => {
- return (
- leido ?
- '' :
-
-
-
- )
-}
-
// Componente que sabe mostrar los mails en una tabla
export const MailsGrid = ({ mails, alLeerMail }) => {
+ const fechaTemplate = (mail) => {
+ return (
+ {mail.fechaCorta}
+ )
+ }
+
+ const marcarComoLeidoTemplate = (mail) => {
+ return (
+ mail.leido ? '' :
+ )
+ }
+
+ const recienteTemplate = (mail) => {
+ return (
+ mail.esReciente() ?
+
+
+ : ''
+ )
+ }
+
+ const leidoTemplate = ({ id, leido }) => {
+ return (
+ leido ?
+ '' :
+
+
+
+ )
+ }
+
return (
@@ -45,7 +45,7 @@ export const MailsGrid = ({ mails, alLeerMail }) => {
-
+
)
}
diff --git a/src/domain/mail.jsx b/src/domain/mail.js
similarity index 100%
rename from src/domain/mail.jsx
rename to src/domain/mail.js
diff --git a/src/domain/mail.test.jsx b/src/domain/mail.test.js
similarity index 100%
rename from src/domain/mail.test.jsx
rename to src/domain/mail.test.js
diff --git a/src/service/mail.jsx b/src/service/mailService.js
similarity index 100%
rename from src/service/mail.jsx
rename to src/service/mailService.js
diff --git a/src/service/mail.test.jsx b/src/service/mailService.test.js
similarity index 96%
rename from src/service/mail.test.jsx
rename to src/service/mailService.test.js
index c624abe..33805e4 100644
--- a/src/service/mail.test.jsx
+++ b/src/service/mailService.test.js
@@ -1,6 +1,6 @@
import { subDays } from "date-fns"
import { Mail } from "../domain/mail"
-import { mailService } from "./mail"
+import { mailService } from "./mailService"
describe('test del service', () => {