From 5718a699cf969a06a21649024d95a5bf124ae628 Mon Sep 17 00:00:00 2001 From: Pavel Mineev Date: Mon, 9 Aug 2021 17:12:32 +0300 Subject: [PATCH] remove unused const, move single used var to chunk --- frontend/app/common/constants.config.ts | 1 - frontend/app/common/constants.ts | 1 - frontend/app/counter.ts | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/app/common/constants.config.ts b/frontend/app/common/constants.config.ts index 01bddacf..8f5fb504 100644 --- a/frontend/app/common/constants.config.ts +++ b/frontend/app/common/constants.config.ts @@ -2,4 +2,3 @@ export const BASE_URL = window.remark_config.host || process.env.REMARK_URL!; export const NODE_ID = process.env.REMARK_NODE!; export const API_BASE = '/api/v1'; export const COMMENT_NODE_CLASSNAME_PREFIX = 'remark42__comment-'; -export const COUNTER_NODE_CLASSNAME = 'remark42__counter'; diff --git a/frontend/app/common/constants.ts b/frontend/app/common/constants.ts index 39351519..c4de4645 100644 --- a/frontend/app/common/constants.ts +++ b/frontend/app/common/constants.ts @@ -1,7 +1,6 @@ import { Sorting, Theme } from './types'; export { BASE_URL, API_BASE, NODE_ID, COMMENT_NODE_CLASSNAME_PREFIX } from './constants.config'; -export const LAST_COMMENTS_NODE_CLASSNAME = 'remark42__last-comments'; export const MAX_SHOWN_ROOT_COMMENTS = 10; export const DEFAULT_SORT: Sorting = '-active'; diff --git a/frontend/app/counter.ts b/frontend/app/counter.ts index 491f37fe..5b318eb8 100644 --- a/frontend/app/counter.ts +++ b/frontend/app/counter.ts @@ -1,4 +1,4 @@ -import { COUNTER_NODE_CLASSNAME, BASE_URL, API_BASE } from 'common/constants.config'; +import { BASE_URL, API_BASE } from 'common/constants.config'; if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); @@ -7,6 +7,7 @@ if (document.readyState === 'loading') { } function init(): void { + const COUNTER_NODE_CLASSNAME = 'remark42__counter'; const nodes = Array.from(document.getElementsByClassName(COUNTER_NODE_CLASSNAME)) as HTMLElement[]; if (!nodes) {