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