@vnejs/plugins.views.screens.disclaimer 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/dist/modules/accept.d.ts +11 -0
- package/dist/modules/accept.js +13 -0
- package/dist/modules/controller.d.ts +1 -5
- package/dist/modules/controller.js +1 -5
- package/dist/modules/disclaimer.d.ts +0 -2
- package/dist/modules/disclaimer.js +0 -8
- package/package.json +3 -1
- package/src/index.ts +7 -1
- package/src/modules/accept.ts +26 -0
- package/src/modules/controller.ts +1 -6
- package/src/modules/disclaimer.ts +0 -10
- package/src/tests/accept.test.ts +65 -0
- package/src/tests/disclaimer.test.ts +1 -14
- package/src/tests/setup.ts +2 -7
- package/src/types.ts +5 -1
- package/src/view/index.tsx +1 -4
package/dist/index.js
CHANGED
|
@@ -2,6 +2,12 @@ import "@vnejs/contracts.views.screens.disclaimer";
|
|
|
2
2
|
import { regPlugin } from "@vnejs/shared";
|
|
3
3
|
import { CONSTANTS, PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.disclaimer";
|
|
4
4
|
import { DisclaimerController } from "./modules/controller.js";
|
|
5
|
+
import { DisclaimerAccept } from "./modules/accept.js";
|
|
5
6
|
import { Disclaimer } from "./modules/disclaimer.js";
|
|
6
7
|
import { DisclaimerView } from "./modules/view.js";
|
|
7
|
-
regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
8
|
+
regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
9
|
+
DisclaimerController,
|
|
10
|
+
DisclaimerAccept,
|
|
11
|
+
Disclaimer,
|
|
12
|
+
DisclaimerView,
|
|
13
|
+
]);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
2
|
+
import type { DisclaimerPluginConstants, DisclaimerPluginEvents, DisclaimerPluginParams, DisclaimerPluginSettings } from "../types.js";
|
|
3
|
+
import type { DisclaimerPluginState } from "../utils/disclaimer.js";
|
|
4
|
+
export declare class DisclaimerAccept extends ModuleControllerAccept<DisclaimerPluginEvents, DisclaimerPluginConstants, DisclaimerPluginSettings, DisclaimerPluginParams, DisclaimerPluginState> {
|
|
5
|
+
name: string;
|
|
6
|
+
EVENT_SHOW: "vne:disclaimer:show";
|
|
7
|
+
EVENT_HIDE: "vne:disclaimer:hide";
|
|
8
|
+
EVENT_ACCEPT: "vne:disclaimer:accept";
|
|
9
|
+
CONTROLS_ZINDEX: number;
|
|
10
|
+
onAccept: () => Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
2
|
+
export class DisclaimerAccept extends ModuleControllerAccept {
|
|
3
|
+
name = "disclaimer.controller.accept";
|
|
4
|
+
EVENT_SHOW = this.EVENTS.DISCLAIMER.SHOW;
|
|
5
|
+
EVENT_HIDE = this.EVENTS.DISCLAIMER.HIDE;
|
|
6
|
+
EVENT_ACCEPT = this.EVENTS.DISCLAIMER.ACCEPT;
|
|
7
|
+
CONTROLS_ZINDEX = this.PARAMS.DISCLAIMER.ZINDEX;
|
|
8
|
+
onAccept = async () => {
|
|
9
|
+
this.emitLog({ action: "accept" });
|
|
10
|
+
await this.emit(this.EVENTS.DISCLAIMER.HIDE);
|
|
11
|
+
this.emitNext();
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -3,12 +3,8 @@ import type { DisclaimerPluginConstants, DisclaimerPluginEvents, DisclaimerPlugi
|
|
|
3
3
|
import type { DisclaimerPluginState } from "../utils/disclaimer.js";
|
|
4
4
|
export declare class DisclaimerController extends ModuleController<DisclaimerPluginEvents, DisclaimerPluginConstants, DisclaimerPluginSettings, DisclaimerPluginParams, DisclaimerPluginState> {
|
|
5
5
|
name: string;
|
|
6
|
-
emitAccept: () => undefined;
|
|
7
6
|
updateEvent: "vne:disclaimer:update";
|
|
8
|
-
controls: {
|
|
9
|
-
abstract_accept: () => undefined;
|
|
10
|
-
abstract_interact: () => undefined;
|
|
11
|
-
};
|
|
7
|
+
controls: {};
|
|
12
8
|
controlsIndex: number;
|
|
13
9
|
subscribe: () => void;
|
|
14
10
|
beforeShow: (args?: {}) => void;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { ModuleController } from "@vnejs/module.components";
|
|
2
2
|
export class DisclaimerController extends ModuleController {
|
|
3
3
|
name = "disclaimer.controller";
|
|
4
|
-
emitAccept = () => void this.emit(this.EVENTS.DISCLAIMER.ACCEPT);
|
|
5
4
|
updateEvent = this.EVENTS.DISCLAIMER.UPDATE;
|
|
6
|
-
controls = {
|
|
7
|
-
[this.CONST.CONTROLS.BUTTONS.ACCEPT]: this.emitAccept,
|
|
8
|
-
[this.CONST.CONTROLS.BUTTONS.INTERACT]: this.emitAccept,
|
|
9
|
-
};
|
|
5
|
+
controls = {};
|
|
10
6
|
controlsIndex = this.PARAMS.DISCLAIMER.ZINDEX;
|
|
11
7
|
subscribe = () => {
|
|
12
8
|
this.on(this.EVENTS.DISCLAIMER.SHOW, this.onShow);
|
|
@@ -3,8 +3,6 @@ import type { LineExecHandlerArg } from "@vnejs/module.core";
|
|
|
3
3
|
import type { DisclaimerPluginConstants, DisclaimerPluginEvents, DisclaimerPluginParams, DisclaimerPluginSettings } from "../types.js";
|
|
4
4
|
export declare class Disclaimer extends ModuleCore<DisclaimerPluginEvents, DisclaimerPluginConstants, DisclaimerPluginSettings, DisclaimerPluginParams> {
|
|
5
5
|
name: string;
|
|
6
|
-
subscribe: () => void;
|
|
7
6
|
init: () => Promise<unknown[]> | undefined;
|
|
8
7
|
onLineExec: ({ line }?: LineExecHandlerArg) => Promise<unknown[]> | undefined;
|
|
9
|
-
onAccept: () => Promise<void>;
|
|
10
8
|
}
|
|
@@ -2,9 +2,6 @@ import { tokenizeExecLine } from "@vnejs/helpers";
|
|
|
2
2
|
import { ModuleCore } from "@vnejs/module.core";
|
|
3
3
|
export class Disclaimer extends ModuleCore {
|
|
4
4
|
name = "disclaimer";
|
|
5
|
-
subscribe = () => {
|
|
6
|
-
this.on(this.EVENTS.DISCLAIMER.ACCEPT, this.onAccept);
|
|
7
|
-
};
|
|
8
5
|
init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
|
|
9
6
|
onLineExec = ({ line = "" } = {}) => {
|
|
10
7
|
const [action = "", id = ""] = tokenizeExecLine(line).map(String);
|
|
@@ -13,9 +10,4 @@ export class Disclaimer extends ModuleCore {
|
|
|
13
10
|
this.emitLog({ action, id });
|
|
14
11
|
return this.emit(this.EVENTS.DISCLAIMER.SHOW, { id });
|
|
15
12
|
};
|
|
16
|
-
onAccept = async () => {
|
|
17
|
-
this.emitLog({ action: "accept" });
|
|
18
|
-
await this.emit(this.EVENTS.DISCLAIMER.HIDE);
|
|
19
|
-
this.emitNext();
|
|
20
|
-
};
|
|
21
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/plugins.views.screens.disclaimer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@vnejs/helpers": "~0.2.0",
|
|
37
37
|
"@vnejs/module.core": "~0.2.0",
|
|
38
38
|
"@vnejs/module.components": "~0.2.0",
|
|
39
|
+
"@vnejs/module.controller.accept": "~0.2.0",
|
|
39
40
|
"@vnejs/contracts.controls": "~0.2.0",
|
|
40
41
|
"@vnejs/contracts.text.locs": "~0.2.0",
|
|
41
42
|
"@vnejs/shared": "~0.2.0",
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"@vnejs/helpers": "~0.2.0",
|
|
52
53
|
"@vnejs/module.core": "~0.2.0",
|
|
53
54
|
"@vnejs/module.components": "~0.2.0",
|
|
55
|
+
"@vnejs/module.controller.accept": "~0.2.0",
|
|
54
56
|
"@vnejs/shared": "~0.2.0",
|
|
55
57
|
"@vnejs/uis.react": "~0.2.0"
|
|
56
58
|
}
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,13 @@ import { regPlugin } from "@vnejs/shared";
|
|
|
4
4
|
import { CONSTANTS, PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.disclaimer";
|
|
5
5
|
|
|
6
6
|
import { DisclaimerController } from "./modules/controller.js";
|
|
7
|
+
import { DisclaimerAccept } from "./modules/accept.js";
|
|
7
8
|
import { Disclaimer } from "./modules/disclaimer.js";
|
|
8
9
|
import { DisclaimerView } from "./modules/view.js";
|
|
9
10
|
|
|
10
|
-
regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
11
|
+
regPlugin(PLUGIN_NAME, { constants: CONSTANTS, events: SUBSCRIBE_EVENTS, params: PARAMS }, [
|
|
12
|
+
DisclaimerController,
|
|
13
|
+
DisclaimerAccept,
|
|
14
|
+
Disclaimer,
|
|
15
|
+
DisclaimerView,
|
|
16
|
+
]);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ModuleControllerAccept } from "@vnejs/module.controller.accept";
|
|
2
|
+
|
|
3
|
+
import type { DisclaimerPluginConstants, DisclaimerPluginEvents, DisclaimerPluginParams, DisclaimerPluginSettings } from "../types.js";
|
|
4
|
+
import type { DisclaimerPluginState } from "../utils/disclaimer.js";
|
|
5
|
+
|
|
6
|
+
export class DisclaimerAccept extends ModuleControllerAccept<
|
|
7
|
+
DisclaimerPluginEvents,
|
|
8
|
+
DisclaimerPluginConstants,
|
|
9
|
+
DisclaimerPluginSettings,
|
|
10
|
+
DisclaimerPluginParams,
|
|
11
|
+
DisclaimerPluginState
|
|
12
|
+
> {
|
|
13
|
+
name = "disclaimer.controller.accept";
|
|
14
|
+
|
|
15
|
+
EVENT_SHOW = this.EVENTS.DISCLAIMER.SHOW;
|
|
16
|
+
EVENT_HIDE = this.EVENTS.DISCLAIMER.HIDE;
|
|
17
|
+
EVENT_ACCEPT = this.EVENTS.DISCLAIMER.ACCEPT;
|
|
18
|
+
|
|
19
|
+
CONTROLS_ZINDEX = this.PARAMS.DISCLAIMER.ZINDEX;
|
|
20
|
+
|
|
21
|
+
onAccept = async () => {
|
|
22
|
+
this.emitLog({ action: "accept" });
|
|
23
|
+
await this.emit(this.EVENTS.DISCLAIMER.HIDE);
|
|
24
|
+
this.emitNext();
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -12,13 +12,8 @@ export class DisclaimerController extends ModuleController<
|
|
|
12
12
|
> {
|
|
13
13
|
name = "disclaimer.controller";
|
|
14
14
|
|
|
15
|
-
emitAccept = () => void this.emit(this.EVENTS.DISCLAIMER.ACCEPT);
|
|
16
|
-
|
|
17
15
|
updateEvent = this.EVENTS.DISCLAIMER.UPDATE;
|
|
18
|
-
controls = {
|
|
19
|
-
[this.CONST.CONTROLS.BUTTONS.ACCEPT]: this.emitAccept,
|
|
20
|
-
[this.CONST.CONTROLS.BUTTONS.INTERACT]: this.emitAccept,
|
|
21
|
-
};
|
|
16
|
+
controls = {};
|
|
22
17
|
controlsIndex = this.PARAMS.DISCLAIMER.ZINDEX;
|
|
23
18
|
|
|
24
19
|
subscribe = () => {
|
|
@@ -9,10 +9,6 @@ import type { DisclaimerShowPayload } from "../utils/disclaimer.js";
|
|
|
9
9
|
export class Disclaimer extends ModuleCore<DisclaimerPluginEvents, DisclaimerPluginConstants, DisclaimerPluginSettings, DisclaimerPluginParams> {
|
|
10
10
|
name = "disclaimer";
|
|
11
11
|
|
|
12
|
-
subscribe = () => {
|
|
13
|
-
this.on(this.EVENTS.DISCLAIMER.ACCEPT, this.onAccept);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
12
|
init = () => this.emit(this.EVENTS.SCENARIO.LINE_EXEC_REG, { module: this.name, handler: this.onLineExec });
|
|
17
13
|
|
|
18
14
|
onLineExec = ({ line = "" }: LineExecHandlerArg = {}) => {
|
|
@@ -24,10 +20,4 @@ export class Disclaimer extends ModuleCore<DisclaimerPluginEvents, DisclaimerPlu
|
|
|
24
20
|
|
|
25
21
|
return this.emit(this.EVENTS.DISCLAIMER.SHOW, { id } satisfies DisclaimerShowPayload);
|
|
26
22
|
};
|
|
27
|
-
|
|
28
|
-
onAccept = async () => {
|
|
29
|
-
this.emitLog({ action: "accept" });
|
|
30
|
-
await this.emit(this.EVENTS.DISCLAIMER.HIDE);
|
|
31
|
-
this.emitNext();
|
|
32
|
-
};
|
|
33
23
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { spyEvent } from "@vnejs/test-utils";
|
|
4
|
+
|
|
5
|
+
import { DisclaimerAccept } from "../modules/accept.js";
|
|
6
|
+
import { CONTROLS_EVENTS, createDisclaimerTestModule, registerDisclaimerPluginVne, SUBSCRIBE_EVENTS } from "./setup.js";
|
|
7
|
+
|
|
8
|
+
describe("DisclaimerAccept", () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
registerDisclaimerPluginVne();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it("SHOW pushes ACCEPT and INTERACT controls", async () => {
|
|
14
|
+
const { module, observer } = createDisclaimerTestModule(DisclaimerAccept);
|
|
15
|
+
const accept = module as DisclaimerAccept;
|
|
16
|
+
const push = spyEvent(observer, CONTROLS_EVENTS.PUSH);
|
|
17
|
+
|
|
18
|
+
await observer.emit(SUBSCRIBE_EVENTS.SHOW);
|
|
19
|
+
|
|
20
|
+
expect(push).toHaveBeenCalledExactlyOnceWith(
|
|
21
|
+
expect.objectContaining({
|
|
22
|
+
key: "disclaimer.controller.accept",
|
|
23
|
+
checkNext: true,
|
|
24
|
+
index: accept.PARAMS.DISCLAIMER.ZINDEX + 1,
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
27
|
+
expect(push.mock.calls[0][0].controls).toHaveProperty(accept.CONST.CONTROLS.BUTTONS.ACCEPT);
|
|
28
|
+
expect(push.mock.calls[0][0].controls).toHaveProperty(accept.CONST.CONTROLS.BUTTONS.INTERACT);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("HIDE pops ACCEPT controls", async () => {
|
|
32
|
+
const { observer } = createDisclaimerTestModule(DisclaimerAccept);
|
|
33
|
+
const pop = spyEvent(observer, CONTROLS_EVENTS.POP);
|
|
34
|
+
|
|
35
|
+
await observer.emit(SUBSCRIBE_EVENTS.HIDE);
|
|
36
|
+
|
|
37
|
+
expect(pop).toHaveBeenCalledExactlyOnceWith({ key: "disclaimer.controller.accept" });
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("ACCEPT and INTERACT emit DISCLAIMER.ACCEPT", async () => {
|
|
41
|
+
const { module, observer } = createDisclaimerTestModule(DisclaimerAccept);
|
|
42
|
+
const accept = module as DisclaimerAccept;
|
|
43
|
+
const acceptEvent = spyEvent(observer, SUBSCRIBE_EVENTS.ACCEPT);
|
|
44
|
+
|
|
45
|
+
accept.controls[accept.CONST.CONTROLS.BUTTONS.ACCEPT]();
|
|
46
|
+
accept.controls[accept.CONST.CONTROLS.BUTTONS.INTERACT]();
|
|
47
|
+
await Promise.resolve();
|
|
48
|
+
await Promise.resolve();
|
|
49
|
+
|
|
50
|
+
expect(acceptEvent).toHaveBeenCalledTimes(2);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("ACCEPT hides and emits next", async () => {
|
|
54
|
+
const { observer } = createDisclaimerTestModule(DisclaimerAccept);
|
|
55
|
+
const hide = spyEvent(observer, SUBSCRIBE_EVENTS.HIDE);
|
|
56
|
+
const next = vi.fn();
|
|
57
|
+
|
|
58
|
+
observer.subscribe("vne:scenario:next", next);
|
|
59
|
+
|
|
60
|
+
await observer.emit(SUBSCRIBE_EVENTS.ACCEPT);
|
|
61
|
+
|
|
62
|
+
expect(hide).toHaveBeenCalledOnce();
|
|
63
|
+
expect(next).toHaveBeenCalledOnce();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it
|
|
1
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
2
|
|
|
3
3
|
import { spyEvent } from "@vnejs/test-utils";
|
|
4
4
|
|
|
@@ -30,17 +30,4 @@ describe("Disclaimer", () => {
|
|
|
30
30
|
|
|
31
31
|
expect(show).not.toHaveBeenCalled();
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
it("ACCEPT hides and emits next", async () => {
|
|
35
|
-
const { observer } = createDisclaimerTestModule(Disclaimer);
|
|
36
|
-
const hide = spyEvent(observer, SUBSCRIBE_EVENTS.HIDE);
|
|
37
|
-
const next = vi.fn();
|
|
38
|
-
|
|
39
|
-
observer.subscribe("vne:scenario:next", next);
|
|
40
|
-
|
|
41
|
-
await observer.emit(SUBSCRIBE_EVENTS.ACCEPT);
|
|
42
|
-
|
|
43
|
-
expect(hide).toHaveBeenCalledOnce();
|
|
44
|
-
expect(next).toHaveBeenCalledOnce();
|
|
45
|
-
});
|
|
46
33
|
});
|
package/src/tests/setup.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { CONSTANTS as CONTROLS_CONST, PLUGIN_NAME as CONTROLS, SUBSCRIBE_EVENTS as CONTROLS_EVENTS } from "@vnejs/contracts.controls";
|
|
2
2
|
import { CONSTANTS, PARAMS, PLUGIN_NAME, SUBSCRIBE_EVENTS } from "@vnejs/contracts.views.screens.disclaimer";
|
|
3
|
-
import {
|
|
4
|
-
createTestModule as baseCreateTestModule,
|
|
5
|
-
registerCoreVne,
|
|
6
|
-
registerVnePlugin,
|
|
7
|
-
stubSilentEvent,
|
|
8
|
-
} from "@vnejs/test-utils";
|
|
3
|
+
import { createTestModule as baseCreateTestModule, registerCoreVne, registerVnePlugin, stubSilentEvent } from "@vnejs/test-utils";
|
|
9
4
|
|
|
10
5
|
export const registerDisclaimerPluginVne = () => {
|
|
11
6
|
registerCoreVne();
|
|
@@ -32,4 +27,4 @@ export const createDisclaimerTestModule = <T extends Parameters<typeof baseCreat
|
|
|
32
27
|
return result;
|
|
33
28
|
};
|
|
34
29
|
|
|
35
|
-
export { SUBSCRIBE_EVENTS, PARAMS, PLUGIN_NAME };
|
|
30
|
+
export { SUBSCRIBE_EVENTS, PARAMS, PLUGIN_NAME, CONTROLS_EVENTS };
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ModuleComponentsConstants, ModuleComponentsEvents, ModuleComponentsParams, ModuleComponentsSettings } from "@vnejs/module.components";
|
|
2
2
|
import type { Constants as ControlsConstants, PluginName as ControlsPluginName } from "@vnejs/contracts.controls";
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
Constants as ScenarioConstants,
|
|
5
|
+
PluginName as ScenarioPluginName,
|
|
6
|
+
SubscribeEvents as ScenarioSubscribeEvents,
|
|
7
|
+
} from "@vnejs/contracts.core.scenario";
|
|
4
8
|
import type { PluginName as LogsPluginName, SubscribeEvents as LogsSubscribeEvents } from "@vnejs/contracts.core.logs";
|
|
5
9
|
import type { PluginName as LocsPluginName, SubscribeEvents as LocsSubscribeEvents } from "@vnejs/contracts.text.locs";
|
|
6
10
|
import type { Constants, Params, PluginName, SubscribeEvents } from "@vnejs/contracts.views.screens.disclaimer";
|
package/src/view/index.tsx
CHANGED
|
@@ -41,10 +41,7 @@ const DisclaimerScreen = ({ store, onMount, PARAMS, emit, EVENTS }: DisclaimerCo
|
|
|
41
41
|
|
|
42
42
|
const propsScreen = useMemo(() => ({ ...propsByView.screen, isShow, isForce }), [isShow, isForce, propsByView.screen]);
|
|
43
43
|
const propsTitle = useMemo(() => ({ ...propsByView.title, text: title }), [title, propsByView.title]);
|
|
44
|
-
const propsControls = useMemo(
|
|
45
|
-
() => ({ ...propsByView.controls, texts: buttonTexts, onClick }),
|
|
46
|
-
[propsByView.controls, buttonTexts, onClick],
|
|
47
|
-
);
|
|
44
|
+
const propsControls = useMemo(() => ({ ...propsByView.controls, texts: buttonTexts, onClick }), [propsByView.controls, buttonTexts, onClick]);
|
|
48
45
|
|
|
49
46
|
return (
|
|
50
47
|
<Screen {...propsScreen}>
|