Files
supabase/apps/studio/components/layouts/BillingLayout.tsx
Ivan VasilovandJoshen Lim 05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00

60 lines
2.2 KiB
TypeScript

import Link from 'next/link'
import type { PropsWithChildren } from 'react'
import ProjectLayout from 'components/layouts/ProjectLayout/ProjectLayout'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import { useSelectedProject } from 'hooks/misc/useSelectedProject'
import { withAuth } from 'hooks/misc/withAuth'
import { X } from 'lucide-react'
export interface BillingLayoutProps {}
const BillingLayout = ({ children }: PropsWithChildren<BillingLayoutProps>) => {
const selectedOrganization = useSelectedOrganization()
const selectedProject = useSelectedProject()
return (
<ProjectLayout hideHeader hideIconBar>
<div className="flex h-full w-full flex-col">
{/* Header */}
<div className="flex items-center space-x-4 border-b py-4 px-5 border-default">
<Link
href={`/org/${selectedOrganization?.slug}/billing`}
className="text-foreground-lighter transition-colors hover:text-foreground"
>
<X size={16} strokeWidth={1.5} />
</Link>
<div className="flex items-center space-x-6">
<h1 className="text-sm text-foreground">Customize your plan</h1>
<div className="h-6 w-px bg-selection"></div>
<div className="flex items-center space-x-3">
<p className="text-sm text-foreground-light">{selectedOrganization?.name}</p>
<span className="text-border-stronger">
<svg
viewBox="0 0 24 24"
width="16"
height="16"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
fill="none"
shapeRendering="geometricPrecision"
>
<path d="M16 3.549L7.12 20.600"></path>
</svg>
</span>
<p className="text-sm text-foreground-light">{selectedProject?.name}</p>
</div>
</div>
</div>
<div className="overflow-auto">
<section className="relative">{children}</section>
</div>
</div>
</ProjectLayout>
)
}
export default withAuth(BillingLayout)