Skip to content

Commit

Permalink
stop switch-case fall through
Browse files Browse the repository at this point in the history
  • Loading branch information
PartyWumpus authored Oct 16, 2023
1 parent 0be308b commit 3cd6894
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions frontend/src/components/store/Store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const BrowseTab: FC<{ children: { setPluginCount: Dispatch<SetStateAction<number
(): DropdownOption[] => [
{ data: 1, label: t('Store.store_tabs.alph_desc') },
{ data: 2, label: t('Store.store_tabs.alph_asce') },
{ data: 3, label: 'date descending' },
{ data: 4, label: 'date ascending' },
{ data: 3, label: 'date ascending' },
{ data: 4, label: 'date descending' },
],
[],
);
Expand All @@ -89,15 +89,19 @@ const BrowseTab: FC<{ children: { setPluginCount: Dispatch<SetStateAction<number
case 1:
direction = SortDirections.ascending;
sort = SortOptions.name;
break;
case 2:
direction = SortDirections.descending;
sort = SortOptions.name;
break;
case 3:
direction = SortDirections.ascending;
sort = SortOptions.date;
break;
case 4:
direction = SortDirections.descending;
sort = SortOptions.date;
break;
}
const res = await getPluginList(sort, direction);
logger.log('got data!', res);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function getPluginList(
if (!store) {
console.log('Could not get a default store, using Default.');
await setSetting('store-url', Store.Default);
return fetch('https://plugins.deckbrew.xyz/plugins', {
return fetch('https://plugins.deckbrew.xyz/plugins' + query, {
method: 'GET',
headers: {
'X-Decky-Version': version.current,
Expand Down

0 comments on commit 3cd6894

Please sign in to comment.