Skip to content

Commit

Permalink
feat: add cobranded for 500 page
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielizzy committed Sep 12, 2024
1 parent 6613133 commit 8a62aec
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 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,31 @@ 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();

console.log('isCobranded', isCobranded);

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 8a62aec

Please sign in to comment.