Minimally loading example.
This commit is contained in:
66
App.js
66
App.js
@@ -1,10 +1,8 @@
|
||||
import 'expo-dev-client';
|
||||
import { ApolloProvider } from "@apollo/client";
|
||||
import * as Sentry from "@sentry/react-native";
|
||||
import "expo-asset";
|
||||
import 'expo-dev-client';
|
||||
import "intl";
|
||||
import "intl/locale-data/jsonp/en";
|
||||
import React from "react";
|
||||
import {
|
||||
MD2LightTheme as DefaultTheme,
|
||||
Provider as PaperProvider,
|
||||
@@ -14,7 +12,6 @@ import Toast from "react-native-toast-message";
|
||||
import { Provider } from "react-redux";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
import ScreenMainComponent from "./components/screen-main/screen-main.component";
|
||||
import { logImEXEvent } from "./firebase/firebase.analytics";
|
||||
import { client } from "./graphql/client";
|
||||
import { persistor, store } from "./redux/store";
|
||||
import "./translations/i18n";
|
||||
@@ -22,18 +19,18 @@ import "./translations/i18n";
|
||||
import RNEventSource from "react-native-event-source";
|
||||
globalThis.EventSource = RNEventSource;
|
||||
|
||||
Sentry.init({
|
||||
dsn: "https://8d6c3de1940a4e4f8b81cf4d2150bdea@o492140.ingest.sentry.io/5558869",
|
||||
enableInExpoDevelopment: true,
|
||||
// tracesSampleRate: 0.2,
|
||||
// integrations: [
|
||||
// new Sentry.ReactNativeTracing({
|
||||
// tracingOrigins: ["localhost", "imex.online", "cloudinary.com", /^\//],
|
||||
// // ... other options
|
||||
// }),
|
||||
// ],
|
||||
//debug: true, // Sentry will try to print out useful debugging information if something goes wrong with sending an event. Set this to `false` in production.
|
||||
});
|
||||
// Sentry.init({
|
||||
// dsn: "https://8d6c3de1940a4e4f8b81cf4d2150bdea@o492140.ingest.sentry.io/5558869",
|
||||
// enableInExpoDevelopment: true,
|
||||
// // tracesSampleRate: 0.2,
|
||||
// // integrations: [
|
||||
// // new Sentry.ReactNativeTracing({
|
||||
// // tracingOrigins: ["localhost", "imex.online", "cloudinary.com", /^\//],
|
||||
// // // ... other options
|
||||
// // }),
|
||||
// // ],
|
||||
// //debug: true, // Sentry will try to print out useful debugging information if something goes wrong with sending an event. Set this to `false` in production.
|
||||
// });
|
||||
|
||||
const theme = {
|
||||
...DefaultTheme,
|
||||
@@ -44,26 +41,21 @@ const theme = {
|
||||
},
|
||||
};
|
||||
|
||||
class App extends React.Component {
|
||||
async componentDidMount() {
|
||||
logImEXEvent("imexmobile_app_start");
|
||||
}
|
||||
const App = () => {
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<ApolloProvider client={client}>
|
||||
<PaperProvider theme={theme}>
|
||||
<ScreenMainComponent />
|
||||
<Toast />
|
||||
</PaperProvider>
|
||||
</ApolloProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
</SafeAreaProvider>
|
||||
);
|
||||
|
||||
render() {
|
||||
return (
|
||||
<SafeAreaProvider>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<ApolloProvider client={client}>
|
||||
<PaperProvider theme={theme}>
|
||||
<ScreenMainComponent />
|
||||
<Toast />
|
||||
</PaperProvider>
|
||||
</ApolloProvider>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
</SafeAreaProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
export default Sentry.wrap(App);
|
||||
export default App;
|
||||
|
||||
@@ -15,7 +15,7 @@ import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.compon
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { splitClient } from "../screen-main/screen-main.component";
|
||||
//import { splitClient } from "../screen-main/screen-main.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
@@ -34,7 +34,7 @@ export function JobDocumentsComponent({ bodyshop, job, loading, refetch }) {
|
||||
const [fullphotos, setFullPhotos] = useState([]);
|
||||
const [imgIndex, setImgIndex] = useState(0);
|
||||
|
||||
const useImgproxy = splitClient.getTreatment("Imgproxy");
|
||||
const useImgproxy = splitClient?.getTreatment("Imgproxy");
|
||||
|
||||
const onRefresh = async () => {
|
||||
return refetch();
|
||||
|
||||
@@ -159,16 +159,17 @@ export function ScreenMainComponent({
|
||||
currentUser,
|
||||
bodyshop,
|
||||
}) {
|
||||
|
||||
useEffect(() => {
|
||||
checkUserSession();
|
||||
}, [checkUserSession]);
|
||||
|
||||
useEffect(() => {
|
||||
LogRocket.init("idt6oy/imex-mobile", {
|
||||
updateId: Updates.isEmbeddedLaunch ? null : Updates.updateId,
|
||||
expoChannel: Updates.channel,
|
||||
});
|
||||
}, []);
|
||||
// useEffect(() => {
|
||||
// // LogRocket.init("idt6oy/imex-mobile", {
|
||||
// // updateId: Updates.isEmbeddedLaunch ? null : Updates.updateId,
|
||||
// // expoChannel: Updates.channel,
|
||||
// // });
|
||||
// }, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (bodyshop && bodyshop.imexshopid) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { AssetsSelector } from "expo-images-picker";
|
||||
//import { AssetsSelector } from "expo-images-picker";
|
||||
import { MediaType } from "expo-media-library";
|
||||
import React, { useCallback, useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -19,8 +19,8 @@ import UploadProgressLocal from "../upload-progress-local/upload-progress-local.
|
||||
import UploadDeleteSwitch from "../upload-delete-switch/upload-delete-switch.component";
|
||||
import UploadProgress from "../upload-progress/upload-progress.component";
|
||||
import { SegmentedButtons } from "react-native-paper";
|
||||
// import * as ImagePicker from "expo-image-picker";
|
||||
// import { Button } from "react-native-paper";
|
||||
import * as ImagePicker from "expo-image-picker";
|
||||
import { Button } from "react-native-paper";
|
||||
// import * as MediaLibrary from "expo-media-library";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -208,7 +208,7 @@ export function ImageBrowserScreen({
|
||||
<Text>{t("mediabrowser.labels.selectjobassetselector")}</Text>
|
||||
</View>
|
||||
)}
|
||||
{selectedCameraJobId && (
|
||||
{/* {selectedCameraJobId && (
|
||||
<AssetsSelector
|
||||
style={{ flex: 1 }}
|
||||
key={tick}
|
||||
@@ -217,7 +217,9 @@ export function ImageBrowserScreen({
|
||||
Styles={widgetStyles}
|
||||
Navigator={widgetNavigator}
|
||||
/>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
<Button>Media Select</Button>
|
||||
{bodyshop.uselocalmediaserver ? (
|
||||
<UploadProgressLocal
|
||||
uploads={uploads}
|
||||
|
||||
2113
package-lock.json
generated
2113
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
62
package.json
62
package.json
@@ -17,22 +17,23 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.12.11",
|
||||
"@babel/preset-env": "7.26.8",
|
||||
"@babel/preset-env": "7.28.3",
|
||||
"@expo/vector-icons": "^15.0.2",
|
||||
"@logrocket/react-native": "^1.52.2",
|
||||
"@logrocket/react-native": "^1.57.3",
|
||||
"@react-native-async-storage/async-storage": "2.2.0",
|
||||
"@react-native-community/cli-debugger-ui": "^15.1.3",
|
||||
"@react-native-community/datetimepicker": "8.4.4",
|
||||
"@react-native-community/masked-view": "^0.1.11",
|
||||
"@react-navigation/bottom-tabs": "^7.2.0",
|
||||
"@react-navigation/drawer": "^7.1.1",
|
||||
"@react-navigation/native": "^7.0.14",
|
||||
"@react-navigation/native-stack": "^7.2.0",
|
||||
"@react-navigation/stack": "^7.1.1",
|
||||
"@react-navigation/bottom-tabs": "^7.4.7",
|
||||
"@react-navigation/drawer": "^7.5.8",
|
||||
"@react-navigation/native": "^7.1.17",
|
||||
"@react-navigation/native-stack": "^7.3.26",
|
||||
"@react-navigation/stack": "^7.4.8",
|
||||
"@reduxjs/toolkit": "^2.9.0",
|
||||
"@sentry/react-native": "~7.1.0",
|
||||
"@splitsoftware/splitio-react-native": "^1.1.0",
|
||||
"axios": "^1.9.0",
|
||||
"cloudinary-core": "^2.13.1",
|
||||
"@splitsoftware/splitio-react-native": "^1.3.0",
|
||||
"axios": "^1.12.2",
|
||||
"cloudinary-core": "^2.14.0",
|
||||
"dinero.js": "^1.9.1",
|
||||
"expo": "^54.0.12",
|
||||
"expo-application": "~7.0.7",
|
||||
@@ -53,22 +54,22 @@
|
||||
"expo-system-ui": "~6.0.7",
|
||||
"expo-updates": "~29.0.12",
|
||||
"expo-video-thumbnails": "~10.0.7",
|
||||
"firebase": "^11.3.1",
|
||||
"firebase": "^12.3.0",
|
||||
"formik": "^2.4.6",
|
||||
"graphql": "^16.10.0",
|
||||
"i18next": "^24.2.2",
|
||||
"graphql": "^16.11.0",
|
||||
"i18next": "^25.5.3",
|
||||
"intl": "^1.2.5",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.5.0",
|
||||
"mime": "^4.0.6",
|
||||
"luxon": "^3.7.2",
|
||||
"mime": "^4.1.0",
|
||||
"moment": "^2.30.1",
|
||||
"normalize-url": "^8.0.1",
|
||||
"normalize-url": "^8.1.0",
|
||||
"react": "19.1.0",
|
||||
"react-dom": "19.1.0",
|
||||
"react-i18next": "^15.4.0",
|
||||
"react-is": ">=19.0.0",
|
||||
"react-i18next": "^16.0.0",
|
||||
"react-is": ">=19.2.0",
|
||||
"react-native": "0.81.4",
|
||||
"react-native-draggable-flatlist": "^4.0.1",
|
||||
"react-native-draggable-flatlist": "^4.0.3",
|
||||
"react-native-element-dropdown": "^2.12.4",
|
||||
"react-native-event-source": "^1.1.0",
|
||||
"react-native-gesture-handler": "~2.28.0",
|
||||
@@ -77,29 +78,30 @@
|
||||
"react-native-indicators": "^0.17.0",
|
||||
"react-native-modal-datetime-picker": "^18.0.0",
|
||||
"react-native-pager-view": "6.9.1",
|
||||
"react-native-paper": "^5.13.1",
|
||||
"react-native-paper": "^5.14.5",
|
||||
"react-native-progress": "^5.0.1",
|
||||
"react-native-reanimated": "~4.1.1",
|
||||
"react-native-safe-area-context": "~5.6.0",
|
||||
"react-native-reanimated": "~4.1.2",
|
||||
"react-native-safe-area-context": "~5.6.1",
|
||||
"react-native-screens": "~4.16.0",
|
||||
"react-native-svg": "15.12.1",
|
||||
"react-native-tab-view": "4.0.5",
|
||||
"react-native-toast-message": "^2.2.1",
|
||||
"react-native-tab-view": "4.1.3",
|
||||
"react-native-toast-message": "^2.3.3",
|
||||
"react-native-vector-icons": "*",
|
||||
"react-native-web": "^0.21.0",
|
||||
"react-native-web": "^0.21.1",
|
||||
"react-native-worklets": "0.5.1",
|
||||
"react-redux": "^9.2.0",
|
||||
"redux": "^5.0.1",
|
||||
"redux-logger": "^3.0.6",
|
||||
"redux-persist": "^6.0.0",
|
||||
"redux-saga": "^1.3.0",
|
||||
"reselect": "^5.1.1"
|
||||
"reselect": "^5.1.1",
|
||||
"rxjs": "^7.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.26.8",
|
||||
"babel-preset-expo": "~54.0.0",
|
||||
"eslint": "^9.20.1",
|
||||
"eslint-plugin-react": "^7.37.4",
|
||||
"@babel/core": "^7.28.4",
|
||||
"babel-preset-expo": "~54.0.3",
|
||||
"eslint": "^9.36.0",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-native": "^5.0.0"
|
||||
},
|
||||
"private": true,
|
||||
|
||||
@@ -9,7 +9,7 @@ const persistConfig = {
|
||||
key: "root",
|
||||
storage: AsyncStorage,
|
||||
// whitelist: ["photos"],
|
||||
blacklist: ["user"],
|
||||
blacklist: ["user",], // Add reducers you do NOT want to persist
|
||||
};
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { applyMiddleware, compose, createStore } from "redux";
|
||||
import { persistStore } from "redux-persist";
|
||||
import { createLogger } from "redux-logger";
|
||||
import createSagaMiddleware from "redux-saga";
|
||||
import rootReducer from "./root.reducer";
|
||||
import rootSaga from "./root.saga";
|
||||
|
||||
import rootReducer from "./root.reducer";
|
||||
const createSagaMiddleware = require('redux-saga').default;
|
||||
const sagaMiddleWare = createSagaMiddleware();
|
||||
|
||||
const middlewares = [sagaMiddleWare];
|
||||
@@ -20,8 +19,8 @@ if (process.env.NODE_ENV === "development") {
|
||||
const composeEnhancers =
|
||||
typeof window === "object" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
|
||||
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
|
||||
})
|
||||
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
|
||||
})
|
||||
: compose;
|
||||
|
||||
const enhancer = composeEnhancers(
|
||||
|
||||
@@ -109,7 +109,7 @@ export function* signInSuccessSaga({ payload }) {
|
||||
try {
|
||||
// Analytics.setUserId(payload.email);//JF:commenting out the firebase analytics portion
|
||||
//Sentry.setUser({ email: payload.email });
|
||||
|
||||
|
||||
const shop = yield client.query({ query: QUERY_BODYSHOP });
|
||||
logImEXEvent("imexmobile_sign_in_success", payload);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import env from "../env";
|
||||
import { client } from "../graphql/client";
|
||||
import { INSERT_NEW_DOCUMENT } from "../graphql/documents.queries";
|
||||
import { axiosAuthInterceptorId } from "./CleanAxios";
|
||||
import { splitClient } from "../components/screen-main/screen-main.component";
|
||||
//import { splitClient } from "../components/screen-main/screen-main.component";
|
||||
import * as FileSystem from "expo-file-system";
|
||||
|
||||
//Context: currentUserEmail, bodyshop, jobid, invoiceid
|
||||
|
||||
Reference in New Issue
Block a user