Код: Выделить всё
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
"./node_modules/@nextui-org/**/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
< /code>
Вот мой компонент, где я использую следующие компоненты, которые дают мне проблемы: < /p>
import {
Modal,
ModalContent,
ModalHeader,
ModalBody,
ModalFooter,
Button,
Input
} from "@nextui-org/react";
import { useState } from "react";
function LoginModal(props) {
const [emailValue, setEmailValue] = useState('')
const [passwordValue, setPasswordValue] = useState('')
const [errorMessage, setErrorMessage] = useState([])
return (
{(onClose) => (
{errorMessage && errorMessage.map(error => {
return {error}
})}
Admin Connection
{
const response = await fetch('http://localhost:3000/users/adminLogin', {
method: 'POST',
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
email: emailValue,
password: passwordValue
})
})
const data = await response.json();
if (data.result) {
props.setIsAdmin(true);
onClose();
} else if (data.result === false) {
const tmpArrayOfErrors = []
tmpArrayOfErrors.push(data.message)
setErrorMessage(tmpArrayOfErrors)
} else if (!data.result) {
for (let i = 0; i < data.errors.length; i ++) {
const tmpArrayOfErrors = []
for (const index in data.errors) {
tmpArrayOfErrors.push(data.errors[index].msg)
}
setErrorMessage(tmpArrayOfErrors)
}
}
}}>
Log in
)}
)
}
export default LoginModal
< /code>
my global.css file: < /p>
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family: "Romantic";
src: url('../fonts/romantic-font-2-1715585786-0/ssromantic.otf');
}
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
width: 100vw;
height: 100vh;
font-family: "Romantic";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
-webkit-tap-highlight-color: transparent;
background-color: #E6E6FA;
}
* {
box-sizing: border-box;
}
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/786 ... ly-on-some