diff --git a/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml b/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml
new file mode 100644
index 00000000..33a8fbc1
--- /dev/null
+++ b/ProjectLighthouse/Pages/Partials/PhotoPartial.cshtml
@@ -0,0 +1,22 @@
+@using LBPUnion.ProjectLighthouse.Types
+@model LBPUnion.ProjectLighthouse.Types.Photo
+
+
+
+
+
+ + Taken by + + @Model.Creator?.Username + + +
+ ++ Photo contains @Model.Subjects.Count @(Model.Subjects.Count == 1 ? "person" : "people"): +
+@foreach (PhotoSubject subject in Model.Subjects) +{ + @subject.User.Username +} \ No newline at end of file diff --git a/ProjectLighthouse/Pages/PhotosPage.cshtml b/ProjectLighthouse/Pages/PhotosPage.cshtml index 844165ca..e579cbc3 100644 --- a/ProjectLighthouse/Pages/PhotosPage.cshtml +++ b/ProjectLighthouse/Pages/PhotosPage.cshtml @@ -12,25 +12,7 @@ @foreach (Photo photo in Model.Photos) {- - Taken by - - @photo.Creator.Username - - -
- -- Photo contains @photo.Subjects.Count @(photo.Subjects.Count == 1 ? "person" : "people"): -
- @foreach (PhotoSubject subject in photo.Subjects) - { - @subject.User.Username - } + @await Html.PartialAsync("Partials/PhotoPartial", photo)- @Model.ProfileUser.Status + @Model.ProfileUser!.Status
- Photo contains @photo.Subjects.Count @(photo.Subjects.Count == 1 ? "person" : "people"): -
- @foreach (PhotoSubject subject in photo.Subjects) - { - @subject.User.Username - } + @await Html.PartialAsync("Partials/PhotoPartial", photo);