Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix dropdown list (#383)

Maksim Mrug3e8e61033035
diff --git a/app/pages/Project/View/components/LiveVisitorsDropdown.tsx b/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
index 50e13db2a..c24aec144 100644
--- a/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
+++ b/app/pages/Project/View/components/LiveVisitorsDropdown.tsx
@@ -52,7 +52,7 @@ const LiveVisitorsDropdown = ({ live, projectId, projectPassword }: {
{' '}
{show ? <ChevronUpIcon className='inline w-4 h-4 ml-1' /> : <ChevronDownIcon className='inline w-4 h-4 ml-1' />}
{show && (
- <div className='absolute z-10 mt-2 right-0 top-3 text-gray-900 bg-white border border-gray-200 rounded-md shadow-lg dark:bg-slate-900 dark:border-slate-700/50 min-w-[250px] max-h-[200px] overflow-auto'>
+ <div className={`absolute z-10 mt-2 right-0 top-3 text-gray-900 bg-white border border-gray-200 rounded-md shadow-lg dark:bg-slate-900 dark:border-slate-700/50 max-h-[200px] overflow-auto ${liveInfo.length === 0 ? 'min-w-[200px]' : 'min-w-max'}`} >
<div className='flex flex-col w-full p-2'>
<p className='text-sm font-semibold text-gray-900 dark:text-gray-50'>
{t('dashboard.liveVisitors')}