From 9f5c2f86371839f439f5e125a526b8c3119d07b1 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 25 May 2026 17:09:45 +0500 Subject: [PATCH] feat: add cart notification effector store --- client/src/shared/model/cart-notifications.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 client/src/shared/model/cart-notifications.ts diff --git a/client/src/shared/model/cart-notifications.ts b/client/src/shared/model/cart-notifications.ts new file mode 100644 index 0000000..64f48f0 --- /dev/null +++ b/client/src/shared/model/cart-notifications.ts @@ -0,0 +1,8 @@ +import { createEvent, createStore } from 'effector' + +export const cartAdded = createEvent() +export const cartDismissed = createEvent() + +export const $cartSnackOpen = createStore(false) + .on(cartAdded, () => true) + .on(cartDismissed, () => false)