From 770d8ee7e4dec80062e7f95d827aeee8b97266ca Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 20 Jun 2023 14:57:37 +0200 Subject: [PATCH] change(ui): city, state display --- api/chalicelib/core/feature_flags.py | 2 +- .../Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js | 3 --- frontend/app/components/ui/CountryFlag/CountryFlag.js | 9 +-------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/api/chalicelib/core/feature_flags.py b/api/chalicelib/core/feature_flags.py index a597ddcb8..a1db7a346 100644 --- a/api/chalicelib/core/feature_flags.py +++ b/api/chalicelib/core/feature_flags.py @@ -128,7 +128,7 @@ def create_feature_flag(project_id: int, user_id: int, feature_flag_data: schema if row is None: return None - return get_feature_flag(project_id=project_id, feature_flag_id=row["feature_flag_id"]) + return get_feature_flag(project_id =project_id, feature_flag_id=row["feature_flag_id"]) def get_feature_flag(project_id: int, feature_flag_id: int) -> Optional[Dict[str, Any]]: diff --git a/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js b/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js index 020272303..f2368fc1e 100644 --- a/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js +++ b/frontend/app/components/Session/Player/ReplayPlayer/EventsBlock/UserCard/UserCard.js @@ -74,9 +74,6 @@ function UserCard({ className, request, session, width, height, similarSessions, {userCity && ( {userCity}, )} - {userState && ( - {userState}, - )} {countries[userCountry]} · diff --git a/frontend/app/components/ui/CountryFlag/CountryFlag.js b/frontend/app/components/ui/CountryFlag/CountryFlag.js index 5f1497e1d..8b04d2ba1 100644 --- a/frontend/app/components/ui/CountryFlag/CountryFlag.js +++ b/frontend/app/components/ui/CountryFlag/CountryFlag.js @@ -1,22 +1,17 @@ import React from 'react'; import cn from 'classnames'; -import { countries } from 'App/constants'; import { Icon } from 'UI'; -import stl from './countryFlag.module.css'; const CountryFlag = ({ userCity = '', - userState = '', country = '', className = '', style = {}, - label = false, width = 22, height = 15, }) => { const knownCountry = !!country && country !== 'UN'; const countryFlag = knownCountry ? country.toLowerCase() : ''; - const countryName = knownCountry ? countries[country] : 'Unknown Country'; return (
@@ -33,9 +28,7 @@ const CountryFlag = ({
)} - {userCity && {userCity},} - {userState && {userState},} - {knownCountry && label &&
{countryName}
} + {userCity && {userCity}} ); };