diff src/UpcomingEvents.ts @ 20:e8c90d893919

layout and sorting
author drewp@bigasterisk.com
date Mon, 26 Aug 2024 16:17:49 -0700
parents 472003015880
children
line wrap: on
line diff
--- a/src/UpcomingEvents.ts	Mon Aug 26 16:17:21 2024 -0700
+++ b/src/UpcomingEvents.ts	Mon Aug 26 16:17:49 2024 -0700
@@ -1,6 +1,6 @@
 import { LitElement, css, html } from "lit";
 import { customElement, property } from "lit/decorators.js";
-import { sortBy } from "lodash";
+import { sortBy, sortedUniqBy } from "lodash";
 import { DataFactory, Quad_Subject, Store } from "n3";
 import { shared } from "./shared";
 import { EV, fetchGraph, parseGraph, RDF } from "./parseRdf";
@@ -34,7 +34,7 @@
           this.evs = [...this.evs, de];
         }
       });
-      this.evs = sortBy(this.evs, "start");
+      this.evs = sortedUniqBy(sortBy(this.evs, "start"), (de) => de.start + de.title);
     });
   }