Skip to content
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
2 changes: 1 addition & 1 deletion assets/src/dashboard/parts/connected/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Sidebar = ({ settings, setSettings, setCanSave, setTab }) => {
<Button
variant="link"
className="optml__button flex w-full justify-center font-bold min-h-40 !no-underline !text-white !bg-opaque-black !rounded"
href={ optimoleDashboardApp.optimoleHome + 'pricing' }
href={ optimoleDashboardApp?.bf_notices?.sidebar?.cta_link ?? optimoleDashboardApp.upgrade_url }
target="_blank"
>
{ optimoleDashboardApp.strings.upgrade.cta }
Expand Down
9 changes: 1 addition & 8 deletions assets/src/dashboard/parts/connected/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,7 @@ const Dashboard = () => {
const visitorsLimitPercent = ( ( userData.visitors / userData.visitors_limit ) * 100 ).toFixed( 0 );

const renewalDate = useMemo( () => {
const timestamp = userData.renews_on;

if ( ! timestamp ) {
return 'N/A';
}

const date = new Date( timestamp * 1000 );
return date.toLocaleDateString( undefined, { year: 'numeric', month: 'short', day: 'numeric' });
return userData.renews_on_formatted;
}, [ userData.renews_on ]);

const formatMetric = ( type, value ) => {
Expand Down
2 changes: 1 addition & 1 deletion assets/src/dashboard/parts/connected/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const ConnectedLayout = ({
}
}, [ canSave ]);

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

return (
<div className="optml-connected 2xl:max-w-screen-xl max-w-screen px-4 mx-auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const FilterControl = ({
) : (
<TextControl
value={ filterValue }
placeholder={ 'matches' === filterMatchType ? 'path' : 'word' }
placeholder={ 'matches' === filterMatchType ? optimoleDashboardApp.strings.path : optimoleDashboardApp.strings.word }
onChange={ updateFilterValue }
className="optml__input"
/>
Expand Down
2 changes: 1 addition & 1 deletion assets/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ export interface AvailableApp {
export interface Routes {
update_option: string
request_update: string
check_redirects: string
connect: string
select_application: string
register_service: string
Expand Down Expand Up @@ -577,6 +576,7 @@ export interface UserData {
is_cname_assigned: string
extra_visits: boolean
renews_on: number
renews_on_formatted: string
can_use_offloading: boolean
domain_dns: string
}
Expand Down
45 changes: 23 additions & 22 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading