Implemented season pack download requests

This commit is contained in:
Aleksi Lassila
2023-08-02 15:32:50 +03:00
parent 9cbee9ed52
commit 353121dcf3
8 changed files with 266 additions and 86 deletions

View File

@@ -33,7 +33,7 @@ export const modalStack = createModalStack();
export type ModalProps = ReturnType<typeof createModalProps>;
export function createModalProps(onClose: () => void) {
export function createModalProps(onClose: () => void, onBack?: () => void) {
const id = Symbol();
function close() {
@@ -41,8 +41,14 @@ export function createModalProps(onClose: () => void) {
modalStack.remove(id);
}
function back() {
onBack?.();
modalStack.remove(id);
}
return {
close,
back,
id
};
}