Integrate Redux for state management, replace useState with Redux store

This commit is contained in:
2024-07-07 15:57:29 +08:00
parent 47d1867cab
commit cdac16a723
11 changed files with 196 additions and 129 deletions

6
actions/qrCodeActions.ts Normal file
View File

@@ -0,0 +1,6 @@
import { createAction } from '@reduxjs/toolkit';
import { QRCode } from '../types';
export const addQRCode = createAction<QRCode>('qrCodes/addQRCode');
export const toggleBookmark = createAction<number>('qrCodes/toggleBookmark');
export const deleteQRCode = createAction<number | null>('qrCodes/deleteQRCode');