diff src/FdCountdown.ts @ 20:e8c90d893919

layout and sorting
author drewp@bigasterisk.com
date Mon, 26 Aug 2024 16:17:49 -0700
parents 472003015880
children a90cb6927c7d
line wrap: on
line diff
--- a/src/FdCountdown.ts	Mon Aug 26 16:17:21 2024 -0700
+++ b/src/FdCountdown.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, uniqBy } from "lodash";
 import { DataFactory, Quad_Subject, Store } from "n3";
 import { shared } from "./shared";
 import { EV, fetchGraph, parseGraph, RDF } from "./parseRdf";
@@ -13,6 +13,9 @@
   static styles = [
     shared,
     css`
+      :host {
+        overflow: hidden;
+      }
       ol {
         list-style: none;
         font-size: 16px;
@@ -65,7 +68,7 @@
         const de = new DisplayEvent(store, graph, ev);
         this.evs = [...this.evs, de];
       });
-      this.evs = sortBy(this.evs, "start");
+      this.evs = sortedUniqBy(sortBy(this.evs, "start"), (de) => de.start + de.title);
     });
   }
   render() {