mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Closing sidebar on chat click, chat mobile overflow fix
This commit is contained in:
parent
da423ab393
commit
b52d72b909
2 changed files with 4 additions and 3 deletions
|
@ -60,7 +60,7 @@ function Donate() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function UserStatus({ userId, unreads }) {
|
function UserStatus({ userId, unreads, onClick }) {
|
||||||
const unreadCount = unreads ? unreads.length : 0
|
const unreadCount = unreads ? unreads.length : 0
|
||||||
return (
|
return (
|
||||||
<div className={styles.userStatus}>
|
<div className={styles.userStatus}>
|
||||||
|
@ -69,6 +69,7 @@ function UserStatus({ userId, unreads }) {
|
||||||
</div>
|
</div>
|
||||||
<Link href="/chat">
|
<Link href="/chat">
|
||||||
<a
|
<a
|
||||||
|
onClick={onClick}
|
||||||
title={`Chat${unreadCount ? ' (' + unreadCount + ' új üzenet)' : ''}`}
|
title={`Chat${unreadCount ? ' (' + unreadCount + ' új üzenet)' : ''}`}
|
||||||
className={styles.unreadNotification}
|
className={styles.unreadNotification}
|
||||||
>
|
>
|
||||||
|
@ -190,7 +191,7 @@ export default function Layout({ children, router, globalData }) {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className={'seperator'} />
|
<div className={'seperator'} />
|
||||||
<UserStatus unreads={unreads} userId={userId} />
|
<UserStatus onClick={closeSideBar} unreads={unreads} userId={userId} />
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.sidebar}>
|
<div className={styles.sidebar}>
|
||||||
{sidebarOpen ? (
|
{sidebarOpen ? (
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
width: 200px;
|
max-width: 200px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
right: 0;
|
right: 0;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue