diff --git a/biome.json b/biome.json
index 1ac79ea95..46c1093b9 100644
--- a/biome.json
+++ b/biome.json
@@ -8,6 +8,9 @@
"noBannedTypes": "off",
"noForEach": "off"
},
+ "nursery": {
+ "useExplicitType": "off"
+ },
"correctness": {
"noUnusedFunctionParameters": "error",
"noUnusedVariables": "error"
diff --git a/src/assets/icons/widgets.ts b/src/assets/icons/widgets.ts
index b3c97d7fb..330b8f1d2 100644
--- a/src/assets/icons/widgets.ts
+++ b/src/assets/icons/widgets.ts
@@ -13,3 +13,11 @@ export const calculatorIcon = (): string =>
`;
+
+export const weatherIcon = (): string =>
+ `
+`;
diff --git a/src/components/Widgets.tsx b/src/components/Widgets.tsx
index 76af6d8fe..20a7430b7 100644
--- a/src/components/Widgets.tsx
+++ b/src/components/Widgets.tsx
@@ -21,7 +21,7 @@ import {
widgetsSelector,
} from '../store/reselect/widgets';
import { setWidgetsSortOrder } from '../store/slices/widgets';
-import { TFeedWidget } from '../store/types/widgets';
+import { TFeedWidget, TWeatherWidgetOptions } from '../store/types/widgets';
import { TouchableOpacity, View } from '../styles/components';
import { Checkmark, PlusIcon, SortAscendingIcon } from '../styles/icons';
import { Caption13Up } from '../styles/text';
@@ -34,6 +34,7 @@ import LuganoFeedWidget from './LuganoFeedWidget';
import PriceWidget from './PriceWidget';
import Button from './buttons/Button';
import CalculatorWidget from './widgets/CalculatorWidget';
+import WeatherWidget from './widgets/WeatherWidget';
const Widgets = (): ReactElement => {
const { t } = useTranslation('slashtags');
@@ -82,33 +83,40 @@ const Widgets = (): ReactElement => {
}
};
- let testID: string;
- let Component:
- | typeof PriceWidget
- | typeof HeadlinesWidget
- | typeof BlocksWidget
- | typeof FactsWidget
- | typeof FeedWidget
- | typeof CalculatorWidget;
-
if (id === 'calculator') {
- Component = CalculatorWidget;
- testID = 'CalculatorWidget';
+ return (
+
+ );
+ }
+ if (id === 'weather') {
+ const options = widgets[id] as TWeatherWidgetOptions;
return (
-
-
-
+
);
}
const feedWidget = widgets[id] as TFeedWidget;
+ let testID: string;
+ let Component:
+ | typeof PriceWidget
+ | typeof HeadlinesWidget
+ | typeof BlocksWidget
+ | typeof FactsWidget
+ | typeof FeedWidget;
switch (feedWidget.type) {
case SUPPORTED_FEED_TYPES.PRICE_FEED:
@@ -137,17 +145,15 @@ const Widgets = (): ReactElement => {
}
return (
-
-
-
+
);
},
[editing, widgets, sortedWidgets.length],
@@ -174,7 +180,9 @@ const Widgets = (): ReactElement => {
id}
- renderItem={renderItem}
+ renderItem={(params): ReactElement => (
+ {renderItem(params)}
+ )}
scrollEnabled={false}
activationDistance={editing ? 0 : 100}
onDragEnd={onDragEnd}
diff --git a/src/components/widgets/BaseWidget.tsx b/src/components/widgets/BaseWidget.tsx
index 88ea0e630..e95b341ef 100644
--- a/src/components/widgets/BaseWidget.tsx
+++ b/src/components/widgets/BaseWidget.tsx
@@ -13,11 +13,13 @@ import { ListIcon, SettingsIcon, TrashIcon } from '../../styles/icons';
import { BodyMSB } from '../../styles/text';
import { truncate } from '../../utils/helpers';
import Dialog from '../Dialog';
+// import LoadingView from '../LoadingView';
import SvgImage from '../SvgImage';
const BaseWidget = ({
id,
children,
+ // isLoading,
isEditing,
style,
testID,
@@ -27,6 +29,7 @@ const BaseWidget = ({
}: {
id: string;
children: ReactElement;
+ // isLoading?: boolean;
isEditing?: boolean;
style?: StyleProp;
testID?: string;
@@ -110,6 +113,15 @@ const BaseWidget = ({
{showTitle && !isEditing && }
{!isEditing && children}
+
+ {/* {!isEditing && (
+
+ {children}
+
+ )} */}