File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 77from pcweb .pages .gallery import gallery
88from pcweb .components .button import button , button_with_icon
99from pcweb .components .code_card import gallery_app_card
10-
10+ import copy
1111
1212GALLERY_APPS_PATH = "templates/"
1313
@@ -28,12 +28,12 @@ def get_route(path: str):
2828
2929paths = flexdown .utils .get_flexdown_files (GALLERY_APPS_PATH )
3030gallery_apps_data = get_gallery_apps (paths )
31- gallery_apps_data_copy = gallery_apps_data .copy ()
3231
3332
3433def more_posts (current_post : dict ) -> rx .Component :
3534 posts = []
36- app_items = list (gallery_apps_data_copy .items ())
35+ app_copy = copy .deepcopy (gallery_apps_data )
36+ app_items = list (app_copy .items ())
3737 current_index = next (
3838 (
3939 i
Original file line number Diff line number Diff line change 11import reflex as rx
2+ import copy
23
34
45def gallery_app_card (app : dict ) -> rx .Component :
@@ -49,8 +50,10 @@ def gallery_app_card(app: dict) -> rx.Component:
4950def component_grid () -> rx .Component :
5051 from pcweb .pages .gallery .apps import gallery_apps_data
5152
53+ apps_copy = copy .deepcopy (gallery_apps_data )
54+
5255 posts = []
53- for path , document in list (gallery_apps_data .items ()):
56+ for path , document in list (apps_copy .items ()):
5457 document .metadata ["url" ] = document .metadata ["title" ]
5558 document .metadata ["title" ] = templates_name_map .get (
5659 document .metadata ["title" ], document .metadata ["title" ]
You can’t perform that action at this time.
0 commit comments