Skip to content

Commit

Permalink
Merge pull request #1152 from ZopaPublic/500-cobranded-fix
Browse files Browse the repository at this point in the history
feat: add cobranded for 500 page
  • Loading branch information
zopa-charlotte-walker authored Sep 12, 2024
2 parents 6613133 + 0c839de commit 2c65f1c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-shoes-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@zopauk/react-components': patch
---

add cobranded to 500
13 changes: 11 additions & 2 deletions src/components/templates/ErrorPages/FiveHundred/FiveHundred.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,29 @@ import { breakpoints } from '../../../../constants/breakpoints';
import { colors } from '../../../../constants';
import { ErrorTemplateProps } from '../types';
import { StyledIcon, StyledLink } from '../styles';
import { ThemeProvider, useThemeContext } from '../../../styles/Theme';
import { ThemeProvider, useThemeContext, AppTheme, zopaTheme } from '../../../styles/Theme';

export interface FiveHundredErrorProps extends ErrorTemplateProps {
linkUrl?: string;
linkText?: string;
isCobranded?: boolean;
}

const FiveHundred = ({
icon = faTools,
linkUrl = 'https://www.zopa.com',
linkText = 'Go to Zopa home',
isCobranded,
}: FiveHundredErrorProps) => {
const { width = 0 } = useViewport();
const theme = useThemeContext();

const themeContext = useThemeContext();
let theme: AppTheme;
if (isCobranded) {
theme = zopaTheme;
} else {
theme = themeContext;
}

return (
<div data-automation="ZA.ErrorPage.FiveHundred">
Expand Down

0 comments on commit 2c65f1c

Please sign in to comment.