Skip to content

Commit 903f861

Browse files
committed
Refactor EvoluDemo
1 parent 465c60b commit 903f861

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

examples/react-expo/app/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Alert from "@blazejkustra/react-native-alert";
12
import type { Evolu as EvoluType } from "@evolu/common";
23
import * as Evolu from "@evolu/common";
34
import { createUseEvolu, EvoluProvider, useQuery } from "@evolu/react";
@@ -7,8 +8,6 @@ import {
78
localAuth,
89
} from "@evolu/react-native/expo-sqlite";
910
import { FC, Suspense, use, useEffect, useMemo, useState } from "react";
10-
11-
import Alert from "@blazejkustra/react-native-alert";
1211
import {
1312
ActivityIndicator,
1413
ScrollView,
@@ -97,15 +96,15 @@ export default function Index(): React.ReactNode {
9796
);
9897
}
9998

100-
function EvoluDemo({
99+
const EvoluDemo = ({
101100
evolu,
102101
ownerIds,
103102
authResult,
104103
}: {
105104
evolu: EvoluType<typeof Schema>;
106105
ownerIds: Array<Evolu.AuthList> | null;
107106
authResult: Evolu.AuthResult | null;
108-
}): React.ReactNode {
107+
}): React.ReactNode => {
109108
const useEvolu = createUseEvolu(evolu);
110109

111110
// Evolu uses Kysely for type-safe SQL (https://kysely.dev/).
@@ -577,7 +576,7 @@ function EvoluDemo({
577576
</ScrollView>
578577
</SafeAreaView>
579578
);
580-
}
579+
};
581580

582581
const styles = StyleSheet.create({
583582
container: {

0 commit comments

Comments
 (0)