diff --git a/package.json b/package.json
index d22580a..4e92355 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"prisma:generate": "prisma generate"
},
"dependencies": {
- "@aulasoftwarelibre/next-auth-firewall": "^1.0.1",
+ "@aulasoftwarelibre/next-auth-firewall": "^1.0.2",
"@auth/core": "^0.0.0-manual.e9863699",
"@auth/prisma-adapter": "^1.0.8",
"@heroicons/react": "^2.0.18",
@@ -76,6 +76,7 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sort": "^2.11.0",
"eslint-plugin-storybook": "^0.6.15",
+ "eslint-plugin-unicorn": "^49.0.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
@@ -108,6 +109,7 @@
},
"extends": [
"next",
+ "plugin:unicorn/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
@@ -146,14 +148,15 @@
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
+ "neverthrow/must-use-result": "error",
"no-shadow": "off",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"sort/destructuring-properties": "error",
"sort/object-properties": "error",
"sort/type-properties": "error",
- "unused-imports/no-unused-imports": "error",
- "neverthrow/must-use-result": "error"
+ "unicorn/prefer-node-protocol": "off",
+ "unused-imports/no-unused-imports": "error"
}
}
}
diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsx
index 2ea54ac..fd068d5 100644
--- a/src/app/(auth)/layout.tsx
+++ b/src/app/(auth)/layout.tsx
@@ -1,6 +1,6 @@
import React from 'react'
-import AuthModal from '@/components/AuthModal/AuthModal'
+import AuthModal from '@/components/auth-modal'
export default function RootLayout({
children,
diff --git a/src/app/(auth)/signin/page.tsx b/src/app/(auth)/signin/page.tsx
index c8cc347..6b0bb96 100644
--- a/src/app/(auth)/signin/page.tsx
+++ b/src/app/(auth)/signin/page.tsx
@@ -3,14 +3,15 @@ import { Metadata } from 'next'
import { redirect } from 'next/navigation'
import React from 'react'
-import AuthModalFooter from '@/components/AuthModal/AuthModalFooter'
-import AuthModalHeader from '@/components/AuthModal/AuthModalHeader'
-import SignInEmailForm from '@/components/SignInEmailForm/SignInEmailForm'
+import AuthModalFooter from '@/components/auth-modal/auth-modal-footer'
+import AuthModalHeader from '@/components/auth-modal/auth-modal-header'
import { auth } from '@/lib/auth/auth'
+import SignInEmailForm from '../../../components/sign-in-email-form'
+
export const metadata: Metadata = {
description: 'Biblioteca del Aula de Software Libre',
- title: 'Codex | Login',
+ title: 'Iniciar sesión | Codex',
}
export default async function Page() {
diff --git a/src/app/(auth)/signout/page.tsx b/src/app/(auth)/signout/page.tsx
index 64a4a39..1b195ba 100644
--- a/src/app/(auth)/signout/page.tsx
+++ b/src/app/(auth)/signout/page.tsx
@@ -2,13 +2,13 @@ import { Metadata } from 'next'
import { redirect } from 'next/navigation'
import React from 'react'
-import AuthModalHeader from '@/components/AuthModal/AuthModalHeader'
-import SignOutForm from '@/components/SignOutForm/SignOutForm'
+import AuthModalHeader from '@/components/auth-modal/auth-modal-header'
+import Index from '@/components/sign-out-form'
import { auth } from '@/lib/auth/auth'
export const metadata: Metadata = {
description: 'Biblioteca del Aula de Software Libre',
- title: 'Codex | Cerrar sesión',
+ title: 'Cerrar sesión | Codex',
}
export default async function Page() {
@@ -21,7 +21,7 @@ export default async function Page() {
return (
<>
-
+
>
)
diff --git a/src/app/(auth)/verify/page.tsx b/src/app/(auth)/verify/page.tsx
index 4ae9e6e..b4dba55 100644
--- a/src/app/(auth)/verify/page.tsx
+++ b/src/app/(auth)/verify/page.tsx
@@ -4,13 +4,13 @@ import Link from 'next/link'
import { redirect } from 'next/navigation'
import React from 'react'
-import AuthModalFooter from '@/components/AuthModal/AuthModalFooter'
-import AuthModalHeader from '@/components/AuthModal/AuthModalHeader'
+import AuthModalFooter from '@/components/auth-modal/auth-modal-footer'
+import AuthModalHeader from '@/components/auth-modal/auth-modal-header'
import { auth } from '@/lib/auth/auth'
export const metadata: Metadata = {
description: 'Biblioteca del Aula de Software Libre',
- title: 'Codex | Verifica tu correo',
+ title: 'Verifica tu correo | Codex',
}
const WEBMAIL_URL = process.env.WEBMAIL_URL as string
diff --git a/src/app/api/mailer/route.ts b/src/app/api/mailer/route.ts
index 66e1c39..66c99d5 100644
--- a/src/app/api/mailer/route.ts
+++ b/src/app/api/mailer/route.ts
@@ -21,11 +21,11 @@ export async function POST(request: Request) {
)
}
- const params: SendVerificationRequestParams = await request.json()
+ const parameters: SendVerificationRequestParams = await request.json()
await new SmtpClient(
process.env.MAILER_DSN as string,
- ).sendVerificationRequest(params)
+ ).sendVerificationRequest(parameters)
return Response.json({ success: true })
}
diff --git a/src/app/books/new/page.tsx b/src/app/books/new/page.tsx
index 0d16573..3e401e3 100644
--- a/src/app/books/new/page.tsx
+++ b/src/app/books/new/page.tsx
@@ -1,13 +1,24 @@
-import BookForm from '@/components/BookForm/BookForm'
-import { createBook } from '@/core/book/infrastructure/actions'
+import { Card, CardBody, CardHeader } from '@nextui-org/react'
+import { Metadata } from 'next'
+
+import BookForm from '@/components/book-form'
+
+export const metadata: Metadata = {
+ description: 'Biblioteca del Aula de Software Libre',
+ title: 'Añadir un nuevo libro | Codex',
+}
export default async function Page() {
return (
-
- Crear Nuevo Libro
-
-
+
+
+ Añadir un nuevo libro
+
+
+
+
+
)
}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index f5c05cc..9a22964 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -3,8 +3,8 @@ import './globals.css'
import type { Metadata } from 'next'
import { Nunito } from 'next/font/google'
-import Header from '@/components/Header/Header'
-import { Providers } from '@/components/Providers/Providers'
+import Header from '@/components/header'
+import { Providers } from '@/components/providers'
import { findUser } from '@/core/user/infrastructure/actions'
import { auth } from '@/lib/auth/auth'
@@ -30,7 +30,7 @@ export default async function RootLayout({
>
- {children}
+ {children}