Skip to content

Commit 47f823c

Browse files
Prettier Format & ESLint
1 parent f85d0fa commit 47f823c

File tree

4 files changed

+35
-39
lines changed

4 files changed

+35
-39
lines changed

components/Sections/configs/Configs.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import prisma from "@/lib/db";
2-
import ConfigsGrid from "./ConfigsGrid";
1+
import prisma from '@/lib/db';
2+
import ConfigsGrid from './ConfigsGrid';
33

44
export default async function Configs() {
55
const configs = await prisma.config.findMany({
@@ -16,7 +16,5 @@ export default async function Configs() {
1616
},
1717
});
1818

19-
return (
20-
<ConfigsGrid configs={configs} />
21-
);
19+
return <ConfigsGrid configs={configs} />;
2220
}

components/Sections/configs/ConfigsGrid.tsx

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use client'
1+
'use client';
22

33
import NewConfigCard from './NewConfig';
44
import prisma from '@/lib/db';
@@ -16,26 +16,28 @@ export default function ConfigsGrid({ configs }: { configs: any }) {
1616

1717
const updateCategory = (value: string) => {
1818
setCategory(value);
19-
}
19+
};
2020

2121
const updateFilter = (e: any) => {
2222
setFilter(e.target.value);
23-
}
23+
};
2424

25-
const filteredConfigs = configs.filter(({ title, description, categories, user }: any) => {
26-
const matchesCategory =
27-
category === 'All' ||
28-
categories.map((cate: string) => cate.toLowerCase()).includes(category.toLowerCase());
29-
const matchesSearchQuery =
30-
title.toLowerCase().includes(filter.toLowerCase()) ||
31-
description
32-
.toLowerCase()
25+
const filteredConfigs = configs.filter(
26+
({ title, description, categories, user }: any) => {
27+
const matchesCategory =
28+
category === 'All' ||
29+
categories
30+
.map((cate: string) => cate.toLowerCase())
31+
.includes(category.toLowerCase());
32+
const matchesSearchQuery =
33+
title.toLowerCase().includes(filter.toLowerCase()) ||
34+
description.toLowerCase().includes(filter.toLowerCase());
35+
categories
36+
.map((cat: string) => cat.toLowerCase())
3337
.includes(filter.toLowerCase());
34-
categories.map((cat: string) => cat.toLowerCase())
35-
.includes(filter.toLowerCase());
36-
return matchesCategory && matchesSearchQuery;
37-
})
38-
38+
return matchesCategory && matchesSearchQuery;
39+
},
40+
);
3941

4042
return (
4143
<div>
@@ -69,11 +71,9 @@ export default function ConfigsGrid({ configs }: { configs: any }) {
6971
) : (
7072
<>
7173
<NewConfigCard />
72-
{
73-
filteredConfigs.map((config: any) => (
74-
<ConfigCard key={config.id} config={config} />
75-
))
76-
}
74+
{filteredConfigs.map((config: any) => (
75+
<ConfigCard key={config.id} config={config} />
76+
))}
7777
</>
7878
)}
7979
</Suspense>
@@ -82,8 +82,6 @@ export default function ConfigsGrid({ configs }: { configs: any }) {
8282
);
8383
}
8484

85-
86-
8785
function Fallback() {
8886
return (
8987
<>

components/Sections/scripts/Scripts.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ export default function Scripts() {
4141

4242
const filteredScripts = scripts
4343
? Object.entries(scripts).filter(([title, scriptData]: any) => {
44-
const matchesCategory =
45-
selectedCategory === 'All' ||
46-
scriptData.category === selectedCategory.toLowerCase();
47-
const matchesSearchQuery =
48-
title.toLowerCase().includes(searchQuery.toLowerCase()) ||
49-
scriptData.description
50-
.toLowerCase()
51-
.includes(searchQuery.toLowerCase());
52-
return matchesCategory && matchesSearchQuery;
53-
})
44+
const matchesCategory =
45+
selectedCategory === 'All' ||
46+
scriptData.category === selectedCategory.toLowerCase();
47+
const matchesSearchQuery =
48+
title.toLowerCase().includes(searchQuery.toLowerCase()) ||
49+
scriptData.description
50+
.toLowerCase()
51+
.includes(searchQuery.toLowerCase());
52+
return matchesCategory && matchesSearchQuery;
53+
})
5454
: [];
5555

5656
if (selectedCategory === 'All') {

components/ui/Nav/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function Header() {
88
<div
99
className="tracking-tight text-white sticky top-0 z-[99999] transition-transform duration-200"
1010
style={{
11-
background: "black",
11+
background: 'black',
1212
imageRendering: 'pixelated',
1313
}}
1414
>

0 commit comments

Comments
 (0)