Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelus22 committed Nov 18, 2023
1 parent d0b1efc commit fe2341b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/panes/configure-panes/keycode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export const KeycodePane: FC = () => {
const {basicKeyToByte} = useAppSelector(getBasicKeyToByte);
const macroCount = useAppSelector(getMacroCount);

if (!macroCount) return null;
console.log(macroCount);
const KeycodeCategories = useMemo(
() => generateKeycodeCategories(basicKeyToByte, macroCount),
Expand Down
9 changes: 6 additions & 3 deletions src/store/devicesSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ export const getSelectedKeyboardAPI = createSelector(
);
export const getMacroCount = createSelector(
getSelectedKeyboardAPI,
async (api) => {
(api) => {
if (!api) return null;
const value:number = await api.getMacroCount();
return value;
api.getMacroCount().then((val) =>
{
console.log(val);
return val;
});
},
);

0 comments on commit fe2341b

Please sign in to comment.