Now using redux to not create sound player every time the phaser is also implicitely cached

This commit is contained in:
Clément Le Bihan
2023-09-04 15:23:52 +02:00
parent 7c3289ccec
commit 30fcacbec6
7 changed files with 220 additions and 126 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import Model, { ModelValidator } from './Model';
import * as yup from 'yup';
import ResponseHandler from './ResponseHandler';
export const SearchType = ['song', 'artist', 'album'] as const;
export const SearchType = ['song', 'artist', 'album', 'genre'] as const;
export type SearchType = (typeof SearchType)[number];
const SearchHistoryValidator = yup
@@ -27,7 +27,7 @@ export const SearchHistoryHandler: ResponseHandler<
interface SearchHistory extends Model {
query: string;
type: 'song' | 'artist' | 'album' | 'genre';
type: SearchType;
userId: number;
timestamp: Date;
}