Skip to content

Commit

Permalink
Don't rely on actual typenames
Browse files Browse the repository at this point in the history
  • Loading branch information
ralismark committed May 12, 2024
1 parent 8833712 commit 71fb2ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/CalendarWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "./CalendarWidget.css"
import { useState } from "react"
import { FacadeExtern } from "../backend"
import { useExtern, useExternOr } from "../extern"
import "./CalendarWidget.css"
import { WidgetControl, Widget } from "./Widget"
import { dateRange, shortdate, today } from "../util/calendar"
import { FileWidget } from "./FileWidget"
Expand Down Expand Up @@ -76,4 +76,8 @@ export class CalendarWidget implements Widget {
</>
]
}

typename(): string {
return "CalendarWidget"
}
}
4 changes: 4 additions & 0 deletions src/components/ConfigWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ export class ConfigWidget implements Widget {
</>,
]
}

typename(): string {
return "ConfigWidget"
}
}
4 changes: 4 additions & 0 deletions src/components/FileWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ export class FileWidget implements Widget {
</>,
]
}

typename(): string {
return "FileWidget"
}
}
1 change: 1 addition & 0 deletions src/components/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface WidgetControl extends SiteControl {
}

export interface Widget {
typename(): string
show(ctl: WidgetControl): [JSX.Element, JSX.Element]
}

Expand Down

0 comments on commit 71fb2ac

Please sign in to comment.