Follow-up
This commit is contained in:
parent
72c0bcd38b
commit
70af1ed7f6
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "telegram-t",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.0-0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -139,7 +139,7 @@ const LeftMainHeader: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
openChat({ id: currentUserId });
|
||||
}, [currentUserId, openChat]);
|
||||
|
||||
const handleDarkModeToggle = useCallback((e: React.SyntheticEvent<HTMLDivElement>) => {
|
||||
const handleDarkModeToggle = useCallback((e: React.SyntheticEvent<HTMLElement>) => {
|
||||
e.stopPropagation();
|
||||
const newTheme = theme === 'light' ? 'dark' : 'light';
|
||||
|
||||
@ -147,7 +147,7 @@ const LeftMainHeader: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||
switchTheme(newTheme, animationLevel > 0);
|
||||
}, [animationLevel, setSettingOption, theme]);
|
||||
|
||||
const handleAnimationLevelChange = useCallback((e: React.SyntheticEvent<HTMLDivElement>) => {
|
||||
const handleAnimationLevelChange = useCallback((e: React.SyntheticEvent<HTMLElement>) => {
|
||||
e.stopPropagation();
|
||||
|
||||
const newLevel = animationLevel === 0 ? 2 : 0;
|
||||
|
||||
@ -5,7 +5,7 @@ import useLang from '../../hooks/useLang';
|
||||
|
||||
import './MenuItem.scss';
|
||||
|
||||
type OnClickHandler = (e: React.SyntheticEvent<HTMLDivElement>) => void;
|
||||
type OnClickHandler = (e: React.SyntheticEvent<HTMLDivElement | HTMLAnchorElement>) => void;
|
||||
|
||||
type OwnProps = {
|
||||
icon?: string;
|
||||
@ -87,6 +87,7 @@ const MenuItem: FC<OwnProps> = (props) => {
|
||||
target={href.startsWith(window.location.origin) ? '_self' : '_blank'}
|
||||
rel="noopener noreferrer"
|
||||
dir={lang.isRtl ? 'rtl' : undefined}
|
||||
onClick={onClick}
|
||||
>
|
||||
{content}
|
||||
</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user