first public source commit
This commit is contained in:
1 parent
1a4fbb9d42
commit
3914fee775
65 files changed
+4697
-312
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user