Skip to content

Commit 226c3cb

Browse files
fix: [M3-7528] - Account Cancellation Survey Button Color Issues (linode#11412)
* fix : [M3-7528] - Account Cancellation Survey Button Color Issues * Add changeset
1 parent 5102218 commit 226c3cb

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@linode/manager": Fixed
3+
---
4+
5+
Account Cancellation Survey Button Color Issues ([#11412](https://github.com/linode/manager/pull/11412))

packages/manager/src/features/CancelLanding/CancelLanding.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { Button, H1Header, Typography } from '@linode/ui';
2+
import { useTheme } from '@mui/material/styles';
23
import { path } from 'ramda';
34
import * as React from 'react';
45
import { Redirect, useLocation } from 'react-router-dom';
56
import { makeStyles } from 'tss-react/mui';
67

7-
import AkamaiLogo from 'src/assets/logo/akamai-logo.svg';
8+
import LightThemeAkamaiLogo from 'src/assets/logo/akamai-logo-color.svg';
9+
import DarkThemeAkamaiLogo from 'src/assets/logo/akamai-logo.svg';
810

911
import type { Theme } from '@mui/material/styles';
1012

@@ -14,8 +16,6 @@ const useStyles = makeStyles()((theme: Theme) => ({
1416
},
1517
root: {
1618
'& button': {
17-
backgroundColor: theme.tokens.color.Green[70],
18-
color: theme.tokens.color.Neutrals.White,
1919
marginTop: theme.spacing(8),
2020
},
2121
'& h1': {
@@ -39,20 +39,25 @@ const useStyles = makeStyles()((theme: Theme) => ({
3939
export const CancelLanding = React.memo(() => {
4040
const { classes } = useStyles();
4141
const location = useLocation();
42+
const theme = useTheme();
4243

43-
const survey_link = path<string>(['state', 'survey_link'], location);
44+
const surveyLink = path<string>(['state', 'survey_link'], location);
4445

45-
if (!survey_link) {
46+
if (!surveyLink) {
4647
return <Redirect to="/" />;
4748
}
4849

4950
const goToSurvey = () => {
50-
window.location.assign(survey_link);
51+
window.location.assign(surveyLink);
5152
};
5253

5354
return (
5455
<div className={classes.root} data-testid="body">
55-
<AkamaiLogo className={classes.logo} />
56+
{theme.name === 'light' ? (
57+
<LightThemeAkamaiLogo className={classes.logo} />
58+
) : (
59+
<DarkThemeAkamaiLogo className={classes.logo} />
60+
)}
5661
<H1Header title="It&rsquo;s been our pleasure to serve you." />
5762
<Typography>
5863
Your account is closed. We hope you&rsquo;ll consider us for your future
@@ -72,5 +77,3 @@ export const CancelLanding = React.memo(() => {
7277
</div>
7378
);
7479
});
75-
76-
export default CancelLanding;

packages/manager/src/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ const store = storeFactory();
2626
setupInterceptors(store);
2727

2828
const Lish = React.lazy(() => import('src/features/Lish'));
29-
const CancelLanding = React.lazy(
30-
() => import('src/features/CancelLanding/CancelLanding')
29+
30+
const CancelLanding = React.lazy(() =>
31+
import('src/features/CancelLanding/CancelLanding').then((module) => ({
32+
default: module.CancelLanding,
33+
}))
3134
);
35+
3236
const LoginAsCustomerCallback = React.lazy(
3337
() => import('src/layouts/LoginAsCustomerCallback')
3438
);

0 commit comments

Comments
 (0)