Add Linked Social Network to User State on Login
Browse files- Update `on_login` function in `functi.py` to store the user's linked social network in the state.
- This change ensures that the user's linked social network is available for use throughout the session.
functi.py
CHANGED
|
@@ -446,6 +446,7 @@ def on_login(state, payload):
|
|
| 446 |
state.current_user = email
|
| 447 |
data = db_manager.fetch_source_table(state.user_inf.user.id)
|
| 448 |
dataac = db_manager.fetch_account_table(state.user_inf.user.id)
|
|
|
|
| 449 |
state.data_schedule = db_manager.fetch_schedule_table_acc(state.user_inf.user.id)
|
| 450 |
state.data_account = pd.DataFrame(dataac)
|
| 451 |
state.Source_table = pd.DataFrame(data)
|
|
|
|
| 446 |
state.current_user = email
|
| 447 |
data = db_manager.fetch_source_table(state.user_inf.user.id)
|
| 448 |
dataac = db_manager.fetch_account_table(state.user_inf.user.id)
|
| 449 |
+
state.Linked_social_network = dataac["account_name"].iloc[0]
|
| 450 |
state.data_schedule = db_manager.fetch_schedule_table_acc(state.user_inf.user.id)
|
| 451 |
state.data_account = pd.DataFrame(dataac)
|
| 452 |
state.Source_table = pd.DataFrame(data)
|