Build errors fixed

Kahdooie v0.2.5
Hossein Rahmani 2024-01-24 10:34:35 +03:30
parent a0ea1e0b95
commit fd42d2ad7f
5 changed files with 32 additions and 24 deletions

View File

@ -24,20 +24,20 @@ export default function Search({
action, action,
changeValue, changeValue,
}: { }: {
mode: string; mode?: string;
value: any; value?: any;
action: (any: any) => any; action?: (any: any) => any;
changeValue: (any: any) => any; changeValue?: (any: any) => any ;
}) { }) {
// useEffect(() => { // useEffect(() => {
// const isMobile = useMediaQuery({ query: "(max-width: 768px)" }); // const isMobile = useMediaQuery({ query: "(max-width: 768px)" });
// }, []); // }, []);
return ( return (
<div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl"> <div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl">
<Input <Input
// type="search" // type="search"
id="default-search" id="default-search"
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
block w-full min-w-[13rem] text-xs md:text-sm text-black block w-full min-w-[13rem] text-xs md:text-sm text-black
text-opacity-60 dark:text-white text-opacity-60 dark:text-white
${mode === "controller" && "h-14 "} ${mode === "controller" && "h-14 "}
@ -46,19 +46,23 @@ export default function Search({
"w-full min-w-full bg-white lg:min-w-full h-11" "w-full min-w-full bg-white lg:min-w-full h-11"
} }
`} `}
value={value} value={value}
onChange={(e) => changeValue(e.target.value)} onChange={(e) => {
placeholder="جستجو..." if (changeValue) {
required changeValue(e.target.value);
/> }
{/* <Button }}
placeholder="جستجو..."
required
/>
{/* <Button
className="absolute left-0 w-auto h-auto bg-transparent text-slate-800" className="absolute left-0 w-auto h-auto bg-transparent text-slate-800"
> >
<CiSearch /> <CiSearch />
</Button> */} </Button> */}
<button onClick={action} className="absolute left-3"> <button onClick={action} className="absolute left-3">
<CiSearch /> <CiSearch />
</button> </button>
</div> </div>
); );
} }

View File

@ -152,7 +152,12 @@ export default function TableController({
})} })}
{data.length != 0 && {data.length != 0 &&
[...Array(5 - data.length)].map(() => { [...Array(5 - data.length)].map(() => {
return <TableRow className="border border-t-0 border-b-0" />; return (
<TableRow
key={Math.random()}
className="border border-t-0 border-b-0"
/>
);
})} })}
</TableBody> </TableBody>
</Table> </Table>

View File

@ -54,7 +54,6 @@ export default function TopNav() {
</svg> </svg>
</div> </div>
<Search mode="landing" />
</div> </div>
</div> </div>
); );

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "sootzani", "name": "sootzani",
"version": "0.2.4", "version": "0.2.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "sootzani", "name": "sootzani",
"version": "0.2.4", "version": "0.2.5",
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.3.2", "@hookform/resolvers": "^3.3.2",
"@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-alert-dialog": "^1.0.5",

View File

@ -1,6 +1,6 @@
{ {
"name": "sootzani", "name": "sootzani",
"version": "0.2.4", "version": "0.2.5",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",