From a566efb5645ae318cbcb6690c4fe2e13f3fcf48a Mon Sep 17 00:00:00 2001
From: "xuan.huang" <5563315+Huxpro@users.noreply.github.com>
Date: Thu, 23 Apr 2026 13:45:05 +0800
Subject: [PATCH] fix(example): align WeatherWidget export name with import
WeatherTestingScreen imports `WeatherWidget` but the file exported
`IosWeatherWidget`, causing an undefined component error in the
Voltra renderer when navigating to the Weather testing screen.
---
example/__tests__/ios/widget-snapshots.harness.tsx | 10 +++++-----
example/widgets/ios/IosWeatherWidget.tsx | 2 +-
example/widgets/ios/ios-weather-initial.tsx | 8 ++++----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/example/__tests__/ios/widget-snapshots.harness.tsx b/example/__tests__/ios/widget-snapshots.harness.tsx
index 3abec09f..911236e9 100644
--- a/example/__tests__/ios/widget-snapshots.harness.tsx
+++ b/example/__tests__/ios/widget-snapshots.harness.tsx
@@ -3,7 +3,7 @@ import { View } from 'react-native'
import { afterAll, beforeAll, describe, expect, Mock, render, spyOn, test } from 'react-native-harness'
import { VoltraWidgetPreview } from 'voltra/client'
-import { IosWeatherWidget } from '../../widgets/ios/IosWeatherWidget'
+import { WeatherWidget } from '../../widgets/ios/IosWeatherWidget'
import { SAMPLE_WEATHER_DATA } from '../../widgets/weather-types'
describe('Widget snapshots', () => {
@@ -34,7 +34,7 @@ describe('Widget snapshots', () => {
-
+
@@ -52,7 +52,7 @@ describe('Widget snapshots', () => {
-
+
@@ -70,7 +70,7 @@ describe('Widget snapshots', () => {
-
+
@@ -88,7 +88,7 @@ describe('Widget snapshots', () => {
-
+
diff --git a/example/widgets/ios/IosWeatherWidget.tsx b/example/widgets/ios/IosWeatherWidget.tsx
index 68f2e1f6..cd135a4d 100644
--- a/example/widgets/ios/IosWeatherWidget.tsx
+++ b/example/widgets/ios/IosWeatherWidget.tsx
@@ -20,7 +20,7 @@ interface WeatherWidgetProps {
weather?: WeatherData
}
-export const IosWeatherWidget = ({ weather = DEFAULT_WEATHER }: WeatherWidgetProps) => {
+export const WeatherWidget = ({ weather = DEFAULT_WEATHER }: WeatherWidgetProps) => {
const gradient = WEATHER_GRADIENTS[weather.condition]
const emoji = WEATHER_EMOJIS[weather.condition]
const description = WEATHER_DESCRIPTIONS[weather.condition]
diff --git a/example/widgets/ios/ios-weather-initial.tsx b/example/widgets/ios/ios-weather-initial.tsx
index 406746ac..63f25789 100644
--- a/example/widgets/ios/ios-weather-initial.tsx
+++ b/example/widgets/ios/ios-weather-initial.tsx
@@ -1,11 +1,11 @@
import type { WidgetVariants } from 'voltra'
-import { IosWeatherWidget } from './IosWeatherWidget'
+import { WeatherWidget } from './IosWeatherWidget'
const initialState: WidgetVariants = {
- systemSmall: ,
- systemMedium: ,
- systemLarge: ,
+ systemSmall: ,
+ systemMedium: ,
+ systemLarge: ,
}
export default initialState