Skip to content

Commit 3da7a69

Browse files
Update to use lemcal component from reflex-ui
- Replace pcweb.components.lemcal imports with reflex_ui.blocks.lemcal - Update pcweb.py to use get_lemcal_script() instead of hardcoded script tag - Update navbar.py to use lemcal_calendar from reflex-ui - Remove old pcweb/components/lemcal.py file - Maintain same functionality while using reusable component Co-Authored-By: Alek <[email protected]>
1 parent 105754c commit 3da7a69

File tree

7 files changed

+8
-39
lines changed

7 files changed

+8
-39
lines changed

pcweb/components/docpage/navbar/navbar.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import reflex as rx
44

5+
from reflex_ui.blocks.lemcal import lemcal_calendar
56
from pcweb.components.button import button
67
from pcweb.components.docpage.navbar.navmenu.navmenu import nav_menu
78
from pcweb.components.hosting_banner import hosting_banner
@@ -564,14 +565,7 @@ def new_component_section() -> rx.Component:
564565

565566
@rx.memo
566567
def lemcal_booking_calendar():
567-
return rx.el.div(
568-
class_name="lemcal-embed-booking-calendar",
569-
custom_attrs={
570-
"data-user": "usr_8tiwtJ8nEJaFj2qH9",
571-
"data-meeting-type": "met_ToQQ9dLZDYrEBv5qz",
572-
},
573-
on_mount=rx.call_function("window.lemcal.refresh"),
574-
)
568+
return lemcal_calendar()
575569

576570

577571
@rx.memo

pcweb/components/lemcal.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

pcweb/pages/gallery/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import reflex as rx
33
import re
44
from pcweb.components.button import button, button_with_icon
5-
from pcweb.components.lemcal import lemcal_button
5+
from reflex_ui.blocks.lemcal import lemcal_button
66
from pcweb.components.code_card import gallery_app_card
77
from pcweb.components.icons import get_icon
88
from pcweb.constants import SCREENSHOT_BUCKET

pcweb/pages/landing/views/start_building.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import reflex as rx
22

33
from pcweb.components.new_button import button
4-
from pcweb.components.lemcal import lemcal_button
4+
from reflex_ui.blocks.lemcal import lemcal_button
55

66

77
def start_building() -> rx.Component:

pcweb/pages/pricing/faq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import reflex as rx
22
from pcweb.components.button import button
3-
from pcweb.components.lemcal import lemcal_button
3+
from reflex_ui.blocks.lemcal import lemcal_button
44

55

66
def glow() -> rx.Component:

pcweb/pages/pricing/table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import reflex as rx
22
from pcweb.components.button import button
3-
from pcweb.components.lemcal import lemcal_button
3+
from reflex_ui.blocks.lemcal import lemcal_button
44

55
STYLES = {
66
"cell": "text-slate-12 font-medium text-sm whitespace-nowrap",

pcweb/pcweb.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import reflex as rx
77

88
import reflex_enterprise as rxe
9+
from reflex_ui.blocks.lemcal import get_lemcal_script
910
from pcweb import styles
1011
from pcweb.meta.meta import favicons_links
1112
from pcweb.pages import page404, routes
@@ -47,10 +48,7 @@
4748
href="https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Mono:ital,wght@0,500;0,600;1,600&family=Source+Code+Pro:wght@400;500&display=swap&family=JetBrains+Mono:wght@400;500;600;700&display=swap",
4849
rel="stylesheet",
4950
),
50-
rx.el.script(
51-
src="https://cdn.lemcal.com/lemcal-integrations.min.js",
52-
defer=True,
53-
),
51+
get_lemcal_script(),
5452
],
5553
)
5654

0 commit comments

Comments
 (0)