From 2b1b29566d89ceed79b6b75e6d8a13b3897505e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=9A=D0=B0=D1=82=D0=B0?= =?UTF-8?q?=D0=B5=D0=B2?= Date: Sat, 2 Dec 2023 20:39:29 +0000 Subject: [PATCH] Draft: Clone --- src/routes.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/routes.ts b/src/routes.ts index ed4a9a6..1b3dfa0 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -128,8 +128,15 @@ export const withCrossButtonRoutes = [ routes.client.subscription(), routes.client.paymentMethod(), ]; -export const hasCrossButton = (path: string) => - withCrossButtonRoutes.includes(path); +/** + * Checks if a given path has a cross button. + * @param {string} path - The path to check. + * @returns {boolean} - True if the path has a cross button, false otherwise. + */ +export const hasCrossButton = (path: string): boolean => { + // Check if the path is included in the array of routes with cross buttons + return withCrossButtonRoutes.includes(path); +}; export const withoutFooterRoutes = [ routes.client.didYouKnow(),