52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
|
|
import { Trans } from '@kit/ui/trans';
|
|
import { cn } from '@kit/ui/utils';
|
|
|
|
import { AppLogo } from '~/components/app-logo';
|
|
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
|
|
import { Search } from '~/components/ui/search';
|
|
|
|
import { SIDEBAR_WIDTH } from '../../../../packages/ui/src/shadcn/constants';
|
|
// home imports
|
|
import { UserNotifications } from '../_components/user-notifications';
|
|
import { type UserWorkspace } from '../_lib/server/load-user-workspace';
|
|
import { Button } from '@kit/ui/button';
|
|
import { ShoppingCart } from 'lucide-react';
|
|
|
|
export function HomeMenuNavigation(props: { workspace: UserWorkspace }) {
|
|
const { workspace, user, accounts } = props.workspace;
|
|
|
|
return (
|
|
<div className={'flex w-full flex-1 items-center justify-between gap-3'}>
|
|
<div className={cn('flex items-center', `w-[${SIDEBAR_WIDTH}]`)}>
|
|
<AppLogo />
|
|
|
|
</div>
|
|
<Search
|
|
className="flex grow"
|
|
startElement={<Trans i18nKey="common:search" values={{ end: '...' }} />}
|
|
/>
|
|
|
|
<div className="flex items-center justify-end gap-3">
|
|
<Button className='relative px-4 py-2 h-10 border-1 mr-0 cursor-pointer' variant='ghost'>
|
|
<span className='flex items-center text-nowrap'>€ 231,89</span>
|
|
</Button>
|
|
<Button variant="ghost" className='relative px-4 py-2 h-10 border-1 mr-0 cursor-pointer' >
|
|
<ShoppingCart className="stroke-[1.5px]" />
|
|
<Trans i18nKey="common:shoppingCart" /> (0)
|
|
</Button>
|
|
<UserNotifications userId={user.id} />
|
|
|
|
<div>
|
|
<ProfileAccountDropdownContainer
|
|
user={user}
|
|
account={workspace}
|
|
showProfileName
|
|
accounts={accounts}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|