Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Update ProfileButton.js

Ash Monshaca612c833f5
diff --git a/components/input/ProfileButton.js b/components/input/ProfileButton.js
index 547054e0b..453f1df3c 100644
--- a/components/input/ProfileButton.js
+++ b/components/input/ProfileButton.js
@@ -5,12 +5,14 @@ import useMessages from 'hooks/useMessages';
import useUser from 'hooks/useUser';
import useConfig from 'hooks/useConfig';
import styles from './ProfileButton.module.css';
+import useLocale from 'hooks/useLocale';
export default function ProfileButton() {
const { formatMessage, labels } = useMessages();
const { user } = useUser();
const { cloudMode } = useConfig();
const router = useRouter();
+ const { dir } = useLocale();
const handleSelect = key => {
if (key === 'profile') {
@@ -31,7 +33,7 @@ export default function ProfileButton() {
<Icons.ChevronDown />
</Icon>
</Button>
- <Popup position="bottom" alignment="end">
+ <Popup position="bottom" alignment={dir === 'rtl' ? 'start' : 'end'}>
<Menu variant="popup" onSelect={handleSelect} className={styles.menu}>
<Item key="user" className={styles.item}>
<Text>{user.username}</Text>