Skip to content

Commit 617acc4

Browse files
author
Dennis Bakhuis
committed
fixed types for meta in add_page() to accept Sequence[Mapping[str, str] | Component]
1 parent b2ed9b4 commit 617acc4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

reflex/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class UnevaluatedPage:
297297
description: Var | str | None
298298
image: str
299299
on_load: EventType[()] | None
300-
meta: Sequence[Mapping[str, str]]
300+
meta: Sequence[Mapping[str, str] | Component]
301301
context: Mapping[str, Any]
302302

303303
def merged_with(self, other: UnevaluatedPage) -> UnevaluatedPage:
@@ -772,7 +772,7 @@ def add_page(
772772
description: str | Var | None = None,
773773
image: str = constants.DefaultPage.IMAGE,
774774
on_load: EventType[()] | None = None,
775-
meta: list[dict[str, str]] = constants.DefaultPage.META_LIST,
775+
meta: list[dict[str, str] | Component] = constants.DefaultPage.META_LIST,
776776
context: dict[str, Any] | None = None,
777777
):
778778
"""Add a page to the app.

reflex/compiler/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def add_meta(
562562
page: Component,
563563
title: str,
564564
image: str,
565-
meta: list[dict],
565+
meta: list[Mapping[str, Any] | Component],
566566
description: str | None = None,
567567
) -> Component:
568568
"""Add metadata to a page.

0 commit comments

Comments
 (0)