Skip to content

Commit 774db53

Browse files
authored
fixes to admin dashboard (#91)
Co-authored-by: pourhakimi <84860195+pourhakimi@users.noreply.github.com>
1 parent 31e8ef7 commit 774db53

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

admin_dashboard/admin_dashboard/admin_dashboard.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ def index() -> rx.Component:
1212
rx.el.div(
1313
navigation(),
1414
rx.el.div(
15-
rx.el.div(
16-
data_table(),
17-
class_name="flex-grow p-6 overflow-y-auto",
18-
),
15+
data_table(),
1916
customer_details(),
20-
class_name="flex flex-row h-[calc(100vh-56px)] overflow-hidden",
17+
class_name="grid grid-cols-1 md:grid-cols-3",
2118
),
22-
class_name="bg-gray-100 h-screen overflow-hidden",
19+
class_name="bg-gray-100 w-full h-screen",
2320
),
2421
appearance="light",
2522
)

admin_dashboard/admin_dashboard/components/customer_details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ def customer_details() -> rx.Component:
176176
class_name="flex items-center justify-center h-[100vh] p-5 bg-gray-50 rounded-lg shadow-inner",
177177
),
178178
),
179-
class_name="w-1/3 flex-shrink-0 h-[100vh] overflow-hidden sticky top-0 right-0 border-l border-gray-200",
179+
class_name="col-span-1",
180180
)

admin_dashboard/admin_dashboard/components/data_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,5 +327,5 @@ def data_table() -> rx.Component:
327327
),
328328
class_name="flex justify-end",
329329
),
330-
class_name="bg-white p-6 rounded-lg shadow-md",
330+
class_name="bg-white p-6 rounded-lg shadow-md col-span-1 md:col-span-2",
331331
)

admin_dashboard/admin_dashboard/components/navigation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def navigation_item(text: str, href: str) -> rx.Component:
1010
href=href,
1111
class_name=rx.cond(
1212
NavigationState.current_page == href,
13-
"px-4 py-2 text-sm font-medium text-white bg-emerald-700 rounded-md shadow-sm",
14-
"px-4 py-2 text-sm font-medium text-emerald-100 hover:bg-emerald-600 hover:text-white rounded-md transition-colors duration-150 ease-in-out",
13+
"px-4 py-2 text-sm font-medium text-white bg-emerald-700 rounded-md shadow-sm whitespace-nowrap sm:whitespace-normal",
14+
"px-4 py-2 text-sm font-medium text-emerald-100 hover:bg-emerald-600 hover:text-white rounded-md transition-colors duration-150 ease-in-out whitespace-nowrap sm:whitespace-normal",
1515
),
1616
)
1717

@@ -22,7 +22,7 @@ def navigation() -> rx.Component:
2222
rx.el.div(
2323
rx.el.img(
2424
src="https://avatars.githubusercontent.com/u/104714959?s=200&v=4",
25-
class_name="h-8 w-auto mr-4",
25+
class_name="h-8 w-auto mr-4 max-md:hidden",
2626
alt="App Logo",
2727
),
2828
navigation_item("Sales Pipeline", "/sales-pipeline"),
@@ -32,7 +32,7 @@ def navigation() -> rx.Component:
3232
"Customer Success Hub",
3333
"/customer-success-hub",
3434
),
35-
class_name="flex items-center space-x-2",
35+
class_name="flex items-center space-x-2 overflow-x-auto w-full",
3636
),
3737
class_name="bg-emerald-800 px-6 py-2 shadow-md sticky top-0 left-0 w-full z-50 h-[56px]",
3838
)

0 commit comments

Comments
 (0)