Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migrate profile text in locales #788

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,11 @@
"headingLogin": "Login",
"inputPlaceholder": "Start typing...",
"linkSupport": "Send an email",
"linkMigrationText": "Migrate Your Profile",
"successWelcome": "Successfully connected to account. Welcome!",
"migrationText1": "Circles Garden profile data is being migrated. You can read about this here:",
"migrationText2": "Please login and visit the 'profile-migrate' page to confirm your preference",
"migrationText3": "Please visit the 'profile-migrate' page to confirm your preference"
"migrationText2": "Please login and visit the Migrate Your Profile page to confirm your preference",
"migrationText3": "Please visit the <a href='{env}/profile-migrate' rel='noopener noreferrer'>Migrate Your Profile</a> page to confirm your preference"
},
"MigrateYourProfile": {
"title": "Migrate Your Profile",
Expand Down
15 changes: 15 additions & 0 deletions src/styles/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,21 @@ export default createTheme({
color: colors.white,
fontWeight: fontWeightMedium,
},
'&.body3_link_gradient': {
'& a': {
lineHeight: '120%',
background: gradients.pinkToPurple,
backgroundClip: 'text',
textFillColor: 'transparent',
textDecorationLine: 'none',
fontWeight: 600,
'&:hover': {
background: gradients.purpleToLightPink,
backgroundClip: 'text',
textFillColor: 'transparent',
},
},
},
},
body2: {
fontWeight: fontWeightBold,
Expand Down
19 changes: 17 additions & 2 deletions src/views/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ const Dashboard = () => {
setIsMenuExpanded(false);
};

const env = process.env.BASE_PATH;
const htmlMigrationContent = (
<span
dangerouslySetInnerHTML={{
__html: translate('Login.migrationText3', {
env,
}),
}}
/>
);

return (
<Fragment>
<BackgroundCurved gradient="turquoise">
Expand Down Expand Up @@ -169,8 +180,12 @@ const Dashboard = () => {
{MIGRATION_INFO_URL}
</ExternalLink>
</Typography>
<Typography align="center" variant="body1">
{translate('Login.migrationText3')}
<Typography
align="center"
classes={{ root: 'body3_link_gradient' }}
variant="body1"
>
{htmlMigrationContent}
</Typography>
</Box>
<AppNote messageVersion="dashboard" />
Expand Down
4 changes: 2 additions & 2 deletions src/views/MigrateYourProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ const MigrateYourProfile = () => {
const user = useSelector((state) => state.user);
const isMigrationAccepted = user?.isMigrationAccepted;

useEffect(async () => {
useEffect(() => {
if (isMigrationAccepted !== undefined && isMigrationAccepted !== null) {
setIsMigrateData(isMigrationAccepted);
setIsLoading(false);
} else {
dispatch(initializeUser());
}
}, [isMigrationAccepted]);
}, [isMigrationAccepted]); // eslint-disable-line react-hooks/exhaustive-deps

const handleOnChangeRadio = (event) => {
setIsMigrateData(event.target.value === 'true');
Expand Down
Loading