From 82e03978b89938219958032efb1448cc76baa181 Mon Sep 17 00:00:00 2001
From: Saumit <justsaumit@protonmail.com>
Date: Sat, 27 Sep 2025 02:14:26 +0530
Subject: Initial snapshot - OpenTelemetry demo 2.1.3 -f

---
 .../CurrencySwitcher/CurrencySwitcher.tsx          | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 src/frontend/components/CurrencySwitcher/CurrencySwitcher.tsx

(limited to 'src/frontend/components/CurrencySwitcher/CurrencySwitcher.tsx')

diff --git a/src/frontend/components/CurrencySwitcher/CurrencySwitcher.tsx b/src/frontend/components/CurrencySwitcher/CurrencySwitcher.tsx
new file mode 100644
index 0000000..0e3b174
--- /dev/null
+++ b/src/frontend/components/CurrencySwitcher/CurrencySwitcher.tsx
@@ -0,0 +1,37 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+import { useMemo } from 'react';
+import getSymbolFromCurrency from 'currency-symbol-map';
+import { useCurrency } from '../../providers/Currency.provider';
+import * as S from './CurrencySwitcher.styled';
+import { CypressFields } from '../../utils/enums/CypressFields';
+
+const CurrencySwitcher = () => {
+  const { currencyCodeList, setSelectedCurrency, selectedCurrency } = useCurrency();
+
+  const currencySymbol = useMemo(() => getSymbolFromCurrency(selectedCurrency), [selectedCurrency]);
+
+  return (
+    <S.CurrencySwitcher>
+      <S.Container>
+        <S.SelectedConcurrency>{currencySymbol}</S.SelectedConcurrency>
+        <S.Select
+          name="currency_code"
+          onChange={(event: { target: { value: string; }; }) => setSelectedCurrency(event.target.value)}
+          value={selectedCurrency}
+          data-cy={CypressFields.CurrencySwitcher}
+        >
+          {currencyCodeList.map(currencyCode => (
+            <option key={currencyCode} value={currencyCode}>
+              {currencyCode}
+            </option>
+          ))}
+        </S.Select>
+        <S.Arrow />
+      </S.Container>
+    </S.CurrencySwitcher>
+  );
+};
+
+export default CurrencySwitcher;
-- 
cgit v1.2.3

