first public source commit

This commit is contained in:
Ben Phelps committed 2022-08-24 10:44:35 +03:00
1 parent 1a4fbb9d42
commit 3914fee775
65 files changed
+4697 -312

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import Weather from "components/widgets/weather/weather";
import Resources from "components/widgets/resources/resources";
const widgetMappings = {
weather: Weather,
resources: Resources,
};
export default function Widget({ widget }) {
const ServiceWidget = widgetMappings[widget.type];
if (ServiceWidget) {
return <ServiceWidget options={widget.options} />;
}
return (
<div className="flex-none flex flex-row items-center justify-center">
Missing <strong>{widget.type}</strong>
</div>
);
}