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,
changeValue,
}: {
mode: string;
value: any;
action: (any: any) => any;
changeValue: (any: any) => any;
mode?: string;
value?: any;
action?: (any: any) => any;
changeValue?: (any: any) => any ;
}) {
// useEffect(() => {
// const isMobile = useMediaQuery({ query: "(max-width: 768px)" });
// }, []);
return (
<div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl">
<Input
// type="search"
id="default-search"
className={`mb-0 h-8 bg-[#E9E9E9] border-none focus-visible:none rounded-lg
<div className="relative flex items-center w-full bg-gray-300 lg:w-1/5 rounded-xl">
<Input
// type="search"
id="default-search"
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
text-opacity-60 dark:text-white
${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"
}
`}
value={value}
onChange={(e) => changeValue(e.target.value)}
placeholder="جستجو..."
required
/>
{/* <Button
value={value}
onChange={(e) => {
if (changeValue) {
changeValue(e.target.value);
}
}}
placeholder="جستجو..."
required
/>
{/* <Button
className="absolute left-0 w-auto h-auto bg-transparent text-slate-800"
>
<CiSearch />
</Button> */}
<button onClick={action} className="absolute left-3">
<CiSearch />
</button>
</div>
<button onClick={action} className="absolute left-3">
<CiSearch />
</button>
</div>
);
}

View File

@ -152,7 +152,12 @@ export default function TableController({
})}
{data.length != 0 &&
[...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>
</Table>

View File

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

4
package-lock.json generated
View File

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

View File

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