Skip to content

Commit d5c71b4

Browse files
committed
Fixing errors with userTypes
1 parent 9e41071 commit d5c71b4

File tree

13 files changed

+32
-24
lines changed

13 files changed

+32
-24
lines changed

src/components/ToolHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function ToolHeader({
103103
items={[
104104
{ title: 'All tools', link: '/' },
105105
{
106-
title: getToolsByCategory(t).find(
106+
title: getToolsByCategory([], t).find(
107107
(category) => category.type === type
108108
)!.rawTitle,
109109
link: '/categories/' + type

src/components/ToolLayout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default function ToolLayout({
4343
const toolDescription: string = t(i18n.description);
4444

4545
const otherCategoryTools =
46-
getToolsByCategory(t)
46+
getToolsByCategory([], t)
4747
.find((category) => category.type === type)
4848
?.tools.filter((tool) => t(tool.name) !== toolTitle)
4949
.map((tool) => ({
@@ -77,8 +77,9 @@ export default function ToolLayout({
7777
<AllTools
7878
title={t('translation:toolLayout.allToolsTitle', '', {
7979
type: capitalizeFirstLetter(
80-
getToolsByCategory(t).find((category) => category.type === type)!
81-
.title
80+
getToolsByCategory([], t).find(
81+
(category) => category.type === type
82+
)!.title
8283
)
8384
})}
8485
toolCards={otherCategoryTools}

src/pages/tools/csv/csv-rows-to-columns/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export const tool = defineTool('csv', {
66
name: 'csv:csvRowsToColumns.title',
77
description: 'csv:csvRowsToColumns.description',
88
shortDescription: 'csv:csvRowsToColumns.shortDescription',
9-
longDescription: 'csv:csvRowsToColumns.longDescription'
9+
longDescription: 'csv:csvRowsToColumns.longDescription',
10+
userTypes: ['General Users', 'Students', 'Developers']
1011
},
1112
path: 'csv-rows-to-columns',
1213
icon: 'fluent:text-arrow-down-right-column-24-filled',
1314
keywords: ['csv', 'rows', 'columns', 'transpose'],
14-
userTypes: ['Developers'],
1515
component: lazy(() => import('./index'))
1616
});

src/pages/tools/csv/csv-to-json/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export const tool = defineTool('csv', {
55
i18n: {
66
name: 'csv:csvToJson.title',
77
description: 'csv:csvToJson.description',
8-
shortDescription: 'csv:csvToJson.shortDescription'
8+
shortDescription: 'csv:csvToJson.shortDescription',
9+
userTypes: ['General Users', 'Students', 'Developers']
910
},
1011

1112
path: 'csv-to-json',
1213
icon: 'lets-icons:json-light',
1314

1415
keywords: ['csv', 'json', 'convert', 'transform', 'parse'],
15-
userTypes: ['Developers'],
1616
component: lazy(() => import('./index'))
1717
});

src/pages/tools/csv/csv-to-tsv/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export const tool = defineTool('csv', {
66
name: 'csv:csvToTsv.title',
77
description: 'csv:csvToTsv.description',
88
shortDescription: 'csv:csvToTsv.shortDescription',
9-
longDescription: 'csv:csvToTsv.longDescription'
9+
longDescription: 'csv:csvToTsv.longDescription',
10+
userTypes: ['General Users', 'Students', 'Developers']
1011
},
1112

1213
path: 'csv-to-tsv',
1314
icon: 'codicon:keyboard-tab',
1415
keywords: ['csv', 'tsv', 'convert', 'transform', 'parse'],
15-
userTypes: ['Developers'],
1616
component: lazy(() => import('./index'))
1717
});

src/pages/tools/csv/csv-to-xml/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ export const tool = defineTool('csv', {
55
i18n: {
66
name: 'csv:csvToXml.title',
77
description: 'csv:csvToXml.description',
8-
shortDescription: 'csv:csvToXml.shortDescription'
8+
shortDescription: 'csv:csvToXml.shortDescription',
9+
userTypes: ['General Users', 'Students', 'Developers']
910
},
1011

1112
path: 'csv-to-xml',
1213
icon: 'mdi-light:xml',
1314

1415
keywords: ['csv', 'xml', 'convert', 'transform', 'parse'],
15-
userTypes: ['Developers'],
1616
component: lazy(() => import('./index'))
1717
});

src/pages/tools/csv/swap-csv-columns/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export const tool = defineTool('csv', {
66
name: 'csv:swapCsvColumns.title',
77
description: 'csv:swapCsvColumns.description',
88
shortDescription: 'csv:swapCsvColumns.shortDescription',
9-
longDescription: 'csv:swapCsvColumns.longDescription'
9+
longDescription: 'csv:swapCsvColumns.longDescription',
10+
userTypes: ['General Users', 'Students', 'Developers']
1011
},
1112

1213
path: 'swap-csv-columns',
1314
icon: 'eva:swap-outline',
1415
keywords: ['csv', 'swap', 'columns'],
15-
userTypes: ['Developers'],
1616
component: lazy(() => import('./index'))
1717
});

src/pages/tools/pdf/editor/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ export const tool = defineTool('pdf', {
55
i18n: {
66
name: 'pdf:editor.title',
77
description: 'pdf:editor.description',
8-
shortDescription: 'pdf:editor.shortDescription'
8+
shortDescription: 'pdf:editor.shortDescription',
9+
userTypes: ['General Users', 'Students', 'Developers']
910
},
1011

1112
path: 'editor',
@@ -26,6 +27,5 @@ export const tool = defineTool('pdf', {
2627
'annotation',
2728
'markup'
2829
],
29-
userTypes: ['General Users', 'Students', 'Developers'],
3030
component: lazy(() => import('./index'))
3131
});

src/pages/tools/string/rot13/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export const tool = defineTool('string', {
66
i18n: {
77
name: 'string:rot13.title',
88
description: 'string:rot13.description',
9-
shortDescription: 'string:rot13.shortDescription'
9+
shortDescription: 'string:rot13.shortDescription',
10+
userTypes: ['General Users', 'Students', 'Developers']
1011
},
1112

1213
path: 'rot13',
1314
icon: 'hugeicons:encrypt',
1415

1516
keywords: ['rot13'],
16-
userTypes: ['Developers', 'CyberSec', 'Students'],
1717
component: lazy(() => import('./index'))
1818
});

src/pages/tools/string/rotate/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ export const tool = defineTool('string', {
66
i18n: {
77
name: 'string:rotate.title',
88
description: 'string:rotate.description',
9-
shortDescription: 'string:rotate.shortDescription'
9+
shortDescription: 'string:rotate.shortDescription',
10+
userTypes: ['General Users', 'Students', 'Developers']
1011
},
1112

1213
path: 'rotate',
1314
icon: 'carbon:rotate',
1415

1516
keywords: ['rotate'],
16-
userTypes: ['General Users', 'Students', 'Developers'],
1717
component: lazy(() => import('./index'))
1818
});

0 commit comments

Comments
 (0)