Skip to content

Commit f213520

Browse files
committed
move constant values to config folder
1 parent eb5ae0d commit f213520

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/Constants.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { FaDev } from 'react-icons/fa'
1616
import { SiProducthunt } from 'react-icons/si'
1717
import { FaReddit, FaMediumM } from 'react-icons/fa'
1818
import { HiTicket } from 'react-icons/hi'
19-
import HashNodeIcon from './static/icon_hashnode.png'
20-
import LobstersIcon from './static/icon_lobsters.png'
19+
import HashNodeIcon from 'src/assets/icon_hashnode.png'
20+
import LobstersIcon from 'src/assets/icon_lobsters.png'
2121
import { FaFreeCodeCamp } from 'react-icons/fa'
2222
import { CgIndieHackers } from 'react-icons/cg'
2323

@@ -34,12 +34,6 @@ const APP = {
3434
dataSourcesLink: 'https://www.hackertab.dev/data-sources',
3535
changeLogLink: 'https://api.github.com/repos/medyo/hackertab.dev/releases',
3636
}
37-
export const ANALYTICS_ENDPOINT = 'https://api.hackertab.dev/analytics'
38-
export const ANALYTICS_SDK_KEY = '9662c93f91473ba6e96711b22e0a367d'
39-
40-
export const LOCAL_CONFIGURATION = {
41-
supportedTags: [], // Loaded remotly
42-
}
4337

4438
export const SUPPORTED_CARDS = [
4539
{
@@ -152,7 +146,6 @@ export const SUPPORTED_SEARCH_ENGINES = [
152146
},
153147
]
154148
export const LS_PREFERENCES_KEY = 'hackerTabPrefs'
155-
export const LS_ANALYTICS_ID_KEY = 'hackerTabAnalyticsId'
156149
export const GLOBAL_TAG = {
157150
value: 'global',
158151
label: 'Trending',

src/config/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const ANALYTICS_ENDPOINT = 'https://api.hackertab.dev/analytics'
2+
export const ANALYTICS_SDK_KEY = '9662c93f91473ba6e96711b22e0a367d'
3+
export const LS_ANALYTICS_ID_KEY = 'hackerTabAnalyticsId'

src/lib/analytics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import AppStorage from '../services/localStorage';
22
import { init, track, identify, Identify } from '@amplitude/analytics-browser'
33
import { isDevelopment } from 'src/utils/Environment';
4-
import { ANALYTICS_SDK_KEY, ANALYTICS_ENDPOINT, LS_ANALYTICS_ID_KEY } from 'src/Constants'
4+
import { ANALYTICS_SDK_KEY, ANALYTICS_ENDPOINT, LS_ANALYTICS_ID_KEY } from 'src/config'
55
import {getAppVersion} from "src/utils/Os";
66

77
enum Objects {

0 commit comments

Comments
 (0)