Skip to content

Commit

Permalink
move constant values to config folder
Browse files Browse the repository at this point in the history
  • Loading branch information
medyo committed Oct 28, 2022
1 parent eb5ae0d commit f213520
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { FaDev } from 'react-icons/fa'
import { SiProducthunt } from 'react-icons/si'
import { FaReddit, FaMediumM } from 'react-icons/fa'
import { HiTicket } from 'react-icons/hi'
import HashNodeIcon from './static/icon_hashnode.png'
import LobstersIcon from './static/icon_lobsters.png'
import HashNodeIcon from 'src/assets/icon_hashnode.png'
import LobstersIcon from 'src/assets/icon_lobsters.png'
import { FaFreeCodeCamp } from 'react-icons/fa'
import { CgIndieHackers } from 'react-icons/cg'

Expand All @@ -34,12 +34,6 @@ const APP = {
dataSourcesLink: 'https://www.hackertab.dev/data-sources',
changeLogLink: 'https://api.github.com/repos/medyo/hackertab.dev/releases',
}
export const ANALYTICS_ENDPOINT = 'https://api.hackertab.dev/analytics'
export const ANALYTICS_SDK_KEY = '9662c93f91473ba6e96711b22e0a367d'

export const LOCAL_CONFIGURATION = {
supportedTags: [], // Loaded remotly
}

export const SUPPORTED_CARDS = [
{
Expand Down Expand Up @@ -152,7 +146,6 @@ export const SUPPORTED_SEARCH_ENGINES = [
},
]
export const LS_PREFERENCES_KEY = 'hackerTabPrefs'
export const LS_ANALYTICS_ID_KEY = 'hackerTabAnalyticsId'
export const GLOBAL_TAG = {
value: 'global',
label: 'Trending',
Expand Down
3 changes: 3 additions & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const ANALYTICS_ENDPOINT = 'https://api.hackertab.dev/analytics'
export const ANALYTICS_SDK_KEY = '9662c93f91473ba6e96711b22e0a367d'
export const LS_ANALYTICS_ID_KEY = 'hackerTabAnalyticsId'
2 changes: 1 addition & 1 deletion src/lib/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import AppStorage from '../services/localStorage';
import { init, track, identify, Identify } from '@amplitude/analytics-browser'
import { isDevelopment } from 'src/utils/Environment';
import { ANALYTICS_SDK_KEY, ANALYTICS_ENDPOINT, LS_ANALYTICS_ID_KEY } from 'src/Constants'
import { ANALYTICS_SDK_KEY, ANALYTICS_ENDPOINT, LS_ANALYTICS_ID_KEY } from 'src/config'
import {getAppVersion} from "src/utils/Os";

enum Objects {
Expand Down

0 comments on commit f213520

Please sign in to comment.