-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified page title for all org pages
- Loading branch information
Showing
10 changed files
with
78 additions
and
48 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
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
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
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
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
35 changes: 35 additions & 0 deletions
35
src/app/[locale]/(console)/organisation/[organisation]/components/PageTitle.tsx
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,35 @@ | ||
import { Avatar } from '@/components/cards/avatar'; | ||
import { cn } from '@/lib/utils'; | ||
import { Organisation } from '@/schema/resources/organisation'; | ||
import React, { ReactNode } from 'react'; | ||
import { TinyOrgName } from './TinyOrgName'; | ||
|
||
export function PageTitle({ | ||
organisation, | ||
title, | ||
children, | ||
className, | ||
}: { | ||
organisation: Organisation; | ||
title: string; | ||
children?: ReactNode; | ||
className?: string; | ||
}) { | ||
return ( | ||
<div | ||
className={cn( | ||
'flex items-end justify-between gap-6 pb-6', | ||
className | ||
)} | ||
> | ||
<div className="flex items-center gap-6"> | ||
<Avatar profile={organisation} renderBadge={false} size="big" /> | ||
<div> | ||
<TinyOrgName name={organisation.name} /> | ||
<h1 className="text-3xl font-semibold">{title}</h1> | ||
</div> | ||
</div> | ||
{children} | ||
</div> | ||
); | ||
} |
File renamed without changes.
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
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
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