Added project page

This commit is contained in:
2025-01-21 18:32:33 +01:00
parent 21e45a8bf7
commit e36c576b79
9 changed files with 211 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
@page "/projects"
@using Portfolio.Shared.Models
@using Portfolio.Shared.Services
@using Portfolio.Web.Components.Components
<h2>Alle Projekte</h2>
<div class="project-container">
@foreach (var project in _projects) {
<ProjectView Project="project" />
}
</div>
@inherits CancellableComponent
@inject IProjectRepository ProjectRepo
@code {
private IEnumerable<Project> _projects = [];
protected override async Task OnInitializedAsync() {
_projects = await ProjectRepo.GetProjects(TokenSource.Token);
}
}