Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Merge pull request #1118 from manikantakailasa/PRESS0-1323
Browse files Browse the repository at this point in the history
bookings ctb added in pages and posts
  • Loading branch information
ramyakrishnai authored Jun 14, 2024
2 parents 94b6fe5 + de7aab7 commit cc2cf79
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
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

0 comments on commit cc2cf79

Please sign in to comment.