Skip to content

Commit

Permalink
removed dummy props from IndexPage in the htmy example, refs #42
Browse files Browse the repository at this point in the history
  • Loading branch information
volfpeter committed Nov 24, 2024
1 parent d8a773b commit 2b74929
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions examples/htmy-rendering/htmy_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import random
from dataclasses import dataclass
from datetime import date
from typing import Any

from fastapi import FastAPI
from htmy import Component, ComponentType, Context, html
Expand Down Expand Up @@ -105,8 +104,6 @@ def htmy(self, context: Context) -> Component:
class IndexPage:
"""Index page."""

props: Any = None

def htmy(self, context: Context) -> Component:
# Lazy load the user list.
return Page(
Expand Down Expand Up @@ -158,7 +155,7 @@ def get_users(rerenders: int = 0, ordered_list: bool = False) -> list[User]:


@app.get("/")
@htmy.page(IndexPage)
@htmy.page(lambda _: IndexPage())
def index() -> None:
"""The index page of the application."""
...

0 comments on commit 2b74929

Please sign in to comment.