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

Press0 1323 | bookings ctb added in pages and posts #1119

Closed
wants to merge 3 commits into from
Closed
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
32 changes: 24 additions & 8 deletions src/app/pages/pages-and-posts/bookingAndAppointments.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,30 @@ const BookingAndAppointments = () => {
) }
</p>
</Card.Content>
<div className="nfd-flex nfd-justify-end nfd-gap-6 nfd-items-center">
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
{ __( 'View all', 'wp-plugin-bluehost' ) }
</a>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
<Button>{ __( 'Add New', 'wp-plugin-bluehost' ) }</Button>
</a>
</div>
{ window.NewfoldRuntime.isYithBookingActive &&
window.NewfoldRuntime.isWoocommerceActive ? (
<>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
{ __( 'View all', 'wp-plugin-bluehost' ) }
</a>
<a href="edit.php?post_type=yith_booking&yith-plugin-fw-panel-skip-redirect=1">
<Button>
{ __( 'Add New', 'wp-plugin-bluehost' ) }
</Button>
</a>
</>
) : (
<Button
as="a"
type="button"
data-ctb-id={ 'e2f4caa1-411c-468b-86b1-a3c4e4e8cec6' }
data-action="load-nfd-ctb"
target="_blank"
variant="upsell"
>
{ __( 'Buy Now', 'wp-plugin-bluehost' ) }
</Button>
) }
</Card>
);
};
Expand Down
5 changes: 1 addition & 4 deletions src/app/pages/pages-and-posts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ const PagesAndPosts = () => {
{ window.NewfoldRuntime.isWoocommerceActive && (
<ProductsPages />
) }
{ window.NewfoldRuntime.isYithBookingActive &&
window.NewfoldRuntime.isWoocommerceActive && (
<BookingAndAppointments />
) }
<BookingAndAppointments />
</div>
</Container>
</Page>
Expand Down
7 changes: 5 additions & 2 deletions src/app/pages/settings/socialMediaAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ const SocialMediaAccounts = () => {
const getFbDetails = () => {
getFacebookUserProfileDetails().then( ( res ) => {
setFbLogin( res === 'token not found!' ? false : true );
if ( Array.isArray( res ) ) setLoginInfo( res[ 0 ] );
else setLoginInfo( res );
if ( Array.isArray( res ) ) {
setLoginInfo( res[ 0 ] );
} else {
setLoginInfo( res );
}
} );
};

Expand Down
Loading