Skip to content

Commit c7ca068

Browse files
release: fixes
- Fixed internationalization and localization issues. - Updated dependencies.
2 parents c0e0922 + 73606fe commit c7ca068

File tree

13 files changed

+466
-282
lines changed

13 files changed

+466
-282
lines changed

assets/src/dashboard/parts/connected/Sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const Sidebar = ({ settings, setSettings, setCanSave, setTab }) => {
103103
<Button
104104
variant="link"
105105
className="optml__button flex w-full justify-center font-bold min-h-40 !no-underline !text-white !bg-opaque-black !rounded"
106-
href={ optimoleDashboardApp.optimoleHome + 'pricing' }
106+
href={ optimoleDashboardApp?.bf_notices?.sidebar?.cta_link ?? optimoleDashboardApp.upgrade_url }
107107
target="_blank"
108108
>
109109
{ optimoleDashboardApp.strings.upgrade.cta }

assets/src/dashboard/parts/connected/dashboard/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,7 @@ const Dashboard = () => {
172172
const visitorsLimitPercent = ( ( userData.visitors / userData.visitors_limit ) * 100 ).toFixed( 0 );
173173

174174
const renewalDate = useMemo( () => {
175-
const timestamp = userData.renews_on;
176-
177-
if ( ! timestamp ) {
178-
return 'N/A';
179-
}
180-
181-
const date = new Date( timestamp * 1000 );
182-
return date.toLocaleDateString( undefined, { year: 'numeric', month: 'short', day: 'numeric' });
175+
return userData.renews_on_formatted;
183176
}, [ userData.renews_on ]);
184177

185178
const formatMetric = ( type, value ) => {

assets/src/dashboard/parts/connected/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const ConnectedLayout = ({
9393
}
9494
}, [ canSave ]);
9595

96-
const showBFBanner = 'free' === plan && optimoleDashboardApp?.bf_notices?.banner;
96+
const showBFBanner = Boolean( optimoleDashboardApp?.bf_notices?.banner );
9797

9898
return (
9999
<div className="optml-connected 2xl:max-w-screen-xl max-w-screen px-4 mx-auto">

assets/src/dashboard/parts/connected/settings/FilterControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const FilterControl = ({
275275
) : (
276276
<TextControl
277277
value={ filterValue }
278-
placeholder={ 'matches' === filterMatchType ? 'path' : 'word' }
278+
placeholder={ 'matches' === filterMatchType ? optimoleDashboardApp.strings.path : optimoleDashboardApp.strings.word }
279279
onChange={ updateFilterValue }
280280
className="optml__input"
281281
/>

assets/src/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,6 @@ export interface AvailableApp {
528528
export interface Routes {
529529
update_option: string
530530
request_update: string
531-
check_redirects: string
532531
connect: string
533532
select_application: string
534533
register_service: string
@@ -577,6 +576,7 @@ export interface UserData {
577576
is_cname_assigned: string
578577
extra_visits: boolean
579578
renews_on: number
579+
renews_on_formatted: string
580580
can_use_offloading: boolean
581581
domain_dns: string
582582
}

composer.lock

Lines changed: 23 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)