-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Move storage page header to own layout
- Loading branch information
1 parent
9d14ab4
commit a3a95c8
Showing
2 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { useTranslations } from 'next-intl'; | ||
|
||
import { Button } from '@/components/ui/Button'; | ||
|
||
import { | ||
Tooltip, | ||
TooltipContent, | ||
TooltipProvider, | ||
TooltipTrigger, | ||
} from '@/components/ui/Tooltip'; | ||
import { ShoppingCart } from 'lucide-react'; | ||
|
||
export default function StorageLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const t = useTranslations('storage'); | ||
|
||
return ( | ||
<> | ||
<div className='relative'> | ||
<h1 className='my-4 md:text-center'>{t('title')}</h1> | ||
<TooltipProvider> | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<Button className='absolute right-0 bottom-0 md:right-5'> | ||
<ShoppingCart /> | ||
</Button> | ||
</TooltipTrigger> | ||
<TooltipContent> | ||
<p>{t('tooltips.viewShoppingCart')}</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
</TooltipProvider> | ||
</div> | ||
{children} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters