-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #681 from WestpacGEL/develop
Develop
- Loading branch information
Showing
243 changed files
with
1,150 additions
and
1,346 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
10 changes: 3 additions & 7 deletions
10
...t]/components/header/header.component.tsx → ...t]/components/header/header.component.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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
18 changes: 13 additions & 5 deletions
18
apps/site/src/app/design-system/layout.tsx → .../src/app/design-system/[brand]/layout.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 |
---|---|---|
@@ -1,26 +1,34 @@ | ||
import { Suspense } from 'react'; | ||
|
||
import { reader } from '@/app/reader'; | ||
import { BrandKey } from '@/app/types/brand.types'; | ||
import { StickyFooter } from '@/components/sticky-footer'; | ||
import { formatNavItems, sortMenu } from '@/utils/format'; | ||
|
||
import { Sidebar, SidebarContextProvider } from './components'; | ||
import { Sidebar, SidebarContextProvider } from '../components'; | ||
|
||
export default async function DesignSystemLayout({ children }: { children: React.ReactNode }) { | ||
export default async function DesignSystemLayout({ | ||
children, | ||
params, | ||
}: { | ||
children: React.ReactNode; | ||
params: { brand: string }; | ||
}) { | ||
const allContent = await reader().collections.designSystem.all(); | ||
const formattedItems = sortMenu(formatNavItems(allContent.map(({ entry, slug }) => ({ slug, name: entry.name })))); | ||
const brand = (params?.brand ?? 'wbc') as BrandKey; // double check this is the best way to do this | ||
|
||
return ( | ||
<> | ||
<div data-theme={brand?.toLowerCase()}> | ||
<div className="flex min-h-screen flex-col text-text active-theme-stg:text-heading"> | ||
<SidebarContextProvider> | ||
<Suspense> | ||
<Sidebar items={formattedItems} /> | ||
<Sidebar items={formattedItems} brand={brand} /> | ||
</Suspense> | ||
<div className="mb-8 flex flex-1 flex-col lg:ml-[18.75rem]">{children}</div> | ||
</SidebarContextProvider> | ||
</div> | ||
<StickyFooter /> | ||
</> | ||
</div> | ||
); | ||
} |
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
3 changes: 3 additions & 0 deletions
3
apps/site/src/app/design-system/components/sidebar/sidebar.types.ts
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { BrandKey } from '@/app/types/brand.types'; | ||
|
||
type Item = { | ||
children?: Item[]; | ||
label: string; | ||
path?: string; | ||
}; | ||
|
||
export type SidebarProps = { | ||
brand: BrandKey; | ||
items: Item[]; | ||
}; |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { useSearchParams } from 'next/navigation'; | ||
import { useParams } from 'next/navigation'; | ||
|
||
import { BANK_OPTIONS } from '@/constants/bank-options'; | ||
|
||
export function useBrand() { | ||
const searchParams = useSearchParams(); | ||
const brand = searchParams.get('brand') ?? 'wbc'; | ||
const params = useParams(); | ||
const brand = params.brand ?? 'wbc'; | ||
return BANK_OPTIONS.find(({ key }) => key === brand); | ||
} |
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
2 changes: 1 addition & 1 deletion
2
apps/site/src/components/component-blocks/components/short-code/short-code.component.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
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
Oops, something went wrong.