Skip to content

Commit

Permalink
perf: disable minute-granularity tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Oct 8, 2022
1 parent 8bbd5c0 commit 9832e66
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/utilities/CommonFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,25 +231,26 @@ export const trackableItems = {
* @returns {Object}
*/
export const termToTrackable = (term) => {
const cetusCustomTimeRegex = /cetus\.(day|night)\.[0-1]?[0-9]?[0-9]?/gi;
const earthCustomTimeRegex = /earth\.(day|night)\.[0-1]?[0-9]?[0-9]?/gi;
const solarisCustomTimeRegex = /solaris\.(warm|cold)\.[0-9]?[0-9]?/gi;
const cambionCustomTimeRegex = /cambion\.(fass|vome)\.[0-1]?[0-9]?[0-9]?/gi;
// const cetusCustomTimeRegex = /cetus\.(day|night)\.[0-1]?[0-9]?[0-9]?/gi;
// const earthCustomTimeRegex = /earth\.(day|night)\.[0-1]?[0-9]?[0-9]?/gi;
// const solarisCustomTimeRegex = /solaris\.(warm|cold)\.[0-9]?[0-9]?/gi;
// const cambionCustomTimeRegex = /cambion\.(fass|vome)\.[0-1]?[0-9]?[0-9]?/gi;

const trackable = {
events: [],
items: [],
};

if (
cetusCustomTimeRegex.test(term) ||
earthCustomTimeRegex.test(term) ||
solarisCustomTimeRegex.test(term) ||
cambionCustomTimeRegex.test(term)
) {
trackable.events = term;
return trackable;
}
// TODO: Eventually reenable when more stable
// if (
// cetusCustomTimeRegex.test(term) ||
// earthCustomTimeRegex.test(term) ||
// solarisCustomTimeRegex.test(term) ||
// cambionCustomTimeRegex.test(term)
// ) {
// trackable.events = term;
// return trackable;
// }

if (term === 'events') {
trackable.events = eventTypes;
Expand Down

0 comments on commit 9832e66

Please sign in to comment.