Skip to content

Commit b3845d1

Browse files
committed
migrate ts to @/
1 parent 286f4d9 commit b3845d1

35 files changed

+104
-102
lines changed

hackathon/spacecraft/App.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
import { AuthenticationProvider } from "@/context/Authentication";
2+
import { NetworkProvider } from "@/context/Network";
3+
import { useAppearanceTheme } from "@/hooks/useAppearanceTheme";
4+
import { Navigator } from "@/navigation/Navigator";
15
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
26
import Constants from "expo-constants";
37
import { Provider as PaperProvider } from "react-native-paper";
48

5-
import { AuthenticationProvider } from "~/context/Authentication";
6-
import { NetworkProvider } from "~/context/Network";
7-
import { useAppearanceTheme } from "~/hooks/useAppearanceTheme";
8-
import { Navigator } from "~/navigation/Navigator";
9-
109
const queryClient = new QueryClient();
1110

1211
const App = () => {

hackathon/spacecraft/app.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
android: {
33
adaptiveIcon: {
4-
backgroundColor: "#FFFFFF",
4+
backgroundColor: "#ffffff",
55
foregroundImage: "./assets/adaptive-icon.png",
66
},
77
package: "weshipit.today.spacecraft",

hackathon/spacecraft/jest.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jest.mock("react-native-reanimated", () => {
99

1010
// The mock for `call` immediately calls the callback which is incorrect
1111
// So we override it with a no-op
12-
Reanimated.default.call = () => { };
12+
Reanimated.default.call = () => {};
1313

1414
return Reanimated;
1515
});

hackathon/spacecraft/src/components/Card.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import type { StarshipProps } from "api/types";
22

3+
import { StarshipCard } from "@/components/StarshipCard";
34
import { NavigationContainer } from "@react-navigation/native";
45

5-
import { StarshipCard } from "~/components/StarshipCard";
6-
76
const shipFixture = {
87
model: "YT-1300 light freighter",
98
name: "Millennium Falcon",

hackathon/spacecraft/src/components/FromInput.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import { FormInput } from "@/components/FromInput";
12
import { fireEvent, render, screen } from "@testing-library/react-native";
23

3-
import { FormInput } from "~/components/FromInput";
4-
54
describe("FormInput", () => {
65
const mock = jest.fn();
76
it("renders correctly", () => {

hackathon/spacecraft/src/components/Offline.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { useNetwork } from "@/context/Network";
2+
import React from "react";
13
import { StyleSheet, Text, View } from "react-native";
24
import { ActivityIndicator, useTheme } from "react-native-paper";
35

4-
import { useNetwork } from "~/context/Network";
5-
66
export const Offline = () => {
77
const { isConnected } = useNetwork();
88
const { colors } = useTheme();

hackathon/spacecraft/src/components/PeopleItem.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import type { PeopleProps } from "api/types";
22

3+
import { Routes } from "@/navigation/Routes";
34
import { useNavigation } from "@react-navigation/native";
45
import { List } from "react-native-paper";
56

6-
import { Routes } from "~/navigation/Routes";
7-
87
interface PeopleItemProps {
98
people: PeopleProps;
109
}

hackathon/spacecraft/src/components/ScreenContainer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import type { ReactNode } from "react";
22

3+
import { Offline } from "@/components/Offline";
34
import { useNavigation } from "@react-navigation/native";
45
import { ScrollView, StyleSheet, View } from "react-native";
56
import { IconButton, Text, useTheme } from "react-native-paper";
67

7-
import { Offline } from "~/components/Offline";
8-
98
interface ScreenContainerProps {
109
accessoryFooter?: ReactNode;
1110
children?: ReactNode;

hackathon/spacecraft/src/components/SkeletonList.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SkeletonList } from "~/components/SkeletonList";
1+
import { SkeletonList } from "@/components/SkeletonList";
22

33
export default {
44
title: "SkeletonList",

hackathon/spacecraft/src/components/StarshipCard.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
import { StarshipCard } from "@/components/StarshipCard";
12
import { NavigationContainer } from "@react-navigation/native";
23
import { render, screen } from "@testing-library/react-native";
34

4-
import { StarshipCard } from "~/components/StarshipCard";
5-
65
const shipFixture = {
76
model: "YT-1300 light freighter",
87
name: "Millennium Falcon",

0 commit comments

Comments
 (0)