Conditionally center new post button
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
3bc9b5c970
commit
812aaab83f
1 changed files with 14 additions and 10 deletions
|
@ -65,6 +65,15 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const composeButton = (
|
||||||
|
<button className='flex flex-1 flex-col items-center px-1.5 py-3.5 text-lg text-gray-600' onClick={handleOpenComposeModal}>
|
||||||
|
<Icon
|
||||||
|
src={require('@tabler/icons/outline/square-rounded-plus.svg')}
|
||||||
|
className='h-6 w-6 text-gray-600 black:text-white'
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='fixed inset-x-0 bottom-0 z-50 flex w-full overflow-x-auto border-t border-solid border-gray-200 bg-white/90 shadow-2xl backdrop-blur-md black:bg-black/80 lg:hidden dark:border-gray-800 dark:bg-primary-900/90'>
|
<div className='fixed inset-x-0 bottom-0 z-50 flex w-full overflow-x-auto border-t border-solid border-gray-200 bg-white/90 shadow-2xl backdrop-blur-md black:bg-black/80 lg:hidden dark:border-gray-800 dark:bg-primary-900/90'>
|
||||||
<button className='flex flex-1 flex-col items-center px-2 py-4 text-lg text-gray-600' onClick={handleOpenSidebar}>
|
<button className='flex flex-1 flex-col items-center px-2 py-4 text-lg text-gray-600' onClick={handleOpenSidebar}>
|
||||||
|
@ -82,7 +91,7 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
exact
|
exact
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{features.groups && (
|
{/* {features.groups && (
|
||||||
<ThumbNavigationLink
|
<ThumbNavigationLink
|
||||||
src={require('@tabler/icons/outline/circles.svg')}
|
src={require('@tabler/icons/outline/circles.svg')}
|
||||||
activeSrc={require('@tabler/icons/filled/circles.svg')}
|
activeSrc={require('@tabler/icons/filled/circles.svg')}
|
||||||
|
@ -90,7 +99,9 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
to='/groups'
|
to='/groups'
|
||||||
exact
|
exact
|
||||||
/>
|
/>
|
||||||
)}
|
)} */}
|
||||||
|
|
||||||
|
{account && !(features.chats || features.conversations) && composeButton}
|
||||||
|
|
||||||
<ThumbNavigationLink
|
<ThumbNavigationLink
|
||||||
src={require('@tabler/icons/outline/search.svg')}
|
src={require('@tabler/icons/outline/search.svg')}
|
||||||
|
@ -112,14 +123,7 @@ const ThumbNavigation: React.FC = (): JSX.Element => {
|
||||||
|
|
||||||
{account && renderMessagesLink()}
|
{account && renderMessagesLink()}
|
||||||
|
|
||||||
{account && (
|
{account && (features.chats || features.conversations) && composeButton}
|
||||||
<button className='flex flex-1 flex-col items-center px-1.5 py-3.5 text-lg text-gray-600' onClick={handleOpenComposeModal}>
|
|
||||||
<Icon
|
|
||||||
src={require('@tabler/icons/outline/square-rounded-plus.svg')}
|
|
||||||
className='h-6 w-6 text-gray-600 black:text-white'
|
|
||||||
/>
|
|
||||||
</button>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue