Skip to content

Commit

Permalink
fix: Show only one language in search params
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroWave022 committed Sep 20, 2024
1 parent 9c64980 commit cc4c8f4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
10 changes: 10 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
"peripherals": "PC peripherals",
"miniPC": "Mini PC"
},
"searchParams": {
"popularity": "popularity",
"descending": "descending",
"ascending": "ascending",
"name": "name",
"cables": "cables",
"sensors": "sensors",
"peripherals": "peripherals",
"miniPC": "minipc"
},
"tooltips": {
"viewShoppingCart": "View shopping cart"
},
Expand Down
10 changes: 10 additions & 0 deletions messages/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
"peripherals": "PC-tilbehør",
"miniPC": "Mini-PC"
},
"searchParams": {
"popularity": "popularitet",
"descending": "synkende",
"ascending": "stigende",
"name": "navn",
"cables": "kabler",
"sensors": "sensorer",
"peripherals": "tilbehoer",
"miniPC": "minipc"
},
"tooltips": {
"viewShoppingCart": "Vis handlekurv"
},
Expand Down
16 changes: 8 additions & 8 deletions src/app/[locale]/(default)/storage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,28 @@ export default function StoragePage({
// TODO: Implement filters and category selection
const categories = [
{
value: 'cables',
label: t('combobox.cables'),
value: t('searchParams.cables'),
},
{
value: 'sensors',
label: t('combobox.sensors'),
value: t('searchParams.sensors'),
},
{
value: 'peripherals',
label: t('combobox.peripherals'),
value: t('searchParams.peripherals'),
},
{
value: 'miniPC',
label: t('combobox.miniPC'),
value: t('searchParams.miniPC'),
},
];

const filters = [
{ name: t('select.popularity'), urlName: 'popularity' },
{ name: t('select.sortDescending'), urlName: 'descending' },
{ name: t('select.sortAscending'), urlName: 'ascending' },
{ name: t('select.name'), urlName: 'name' },
{ name: t('select.popularity'), urlName: t('searchParams.popularity') },
{ name: t('select.sortDescending'), urlName: t('searchParams.descending') },
{ name: t('select.sortAscending'), urlName: t('searchParams.ascending') },
{ name: t('select.name'), urlName: t('searchParams.name') },
];

return (
Expand Down

0 comments on commit cc4c8f4

Please sign in to comment.