Skip to content

Commit

Permalink
Merge pull request #99 from wednesday-solutions/feat/recoil-integrations
Browse files Browse the repository at this point in the history
Feat/recoil integrations
  • Loading branch information
shamoilattaar-wednesday authored Sep 5, 2024
2 parents 9c4aa4d + 732b82a commit 05d2991
Show file tree
Hide file tree
Showing 63 changed files with 1,024 additions and 1,857 deletions.
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ android/**
ios/**
__tests__/**
**/tests/***
web-build/**
.eslintrc.js
e2e/**/*.*
metrics/*
jest.setup.js
babel.config.js
reports
report.json
**/tests/*.test.js
growthbook.js
**/tests/*.test.js
webpack.config.js
8 changes: 3 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = {
'immutable',
'sonarjs',
'prettier',
'redux-saga',
'react-native',
'react',
'react-hooks',
Expand Down Expand Up @@ -95,8 +94,6 @@ module.exports = {
'react/require-extension': 0,
'react/self-closing-comp': 0,
'react/sort-comp': 0,
'redux-saga/no-yield-in-race': 2,
'redux-saga/yield-effects': 2,
'require-yield': 0,
'react/no-array-index-key': 0,
'react/jsx-curly-newline': 0,
Expand All @@ -119,7 +116,7 @@ module.exports = {
}
],
'no-shadow': 'error',
complexity: ['error', 2],
complexity: ['error', 4],
'no-empty': 'error',
'import/order': [
'error',
Expand All @@ -145,7 +142,8 @@ module.exports = {
}
],
'fp/no-nil': 0,
'fp/no-unused-expression': 0
'fp/no-unused-expression': 0,
'fp/no-throw': 0
},
settings: {
'import/resolver': {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: react-native-template
on:
push:
branches: [ master ]
branches: [master, dev]
pull_request:
branches: [ master ]
branches: [master, dev]
jobs:
install-and-test:
runs-on: ubuntu-latest
Expand All @@ -13,7 +13,7 @@ jobs:
run: yarn

- name: Lint
run: npm run lint
run: yarn lint

- name: Test and generate coverage report
uses: artiomtr/[email protected]
Expand Down
Empty file removed .github/workflows/cd-prod-ios.yaml
Empty file.
23 changes: 9 additions & 14 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
import React from 'react';
import { RecoilRoot } from 'recoil';
import { I18nextProvider } from 'react-i18next';
import 'react-native-gesture-handler';
import LanguageProvider from '@atoms/LanguageProvider';
import RootScreen from '@scenes/RootScreen';
import i18n from '@app/i18n';
import createStore from '@app/rootReducer';

import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/lib/integration/react';
import 'react-native-gesture-handler';
const { store, persistor } = createStore();
const App = () => (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<I18nextProvider i18n={i18n}>
<LanguageProvider>
<RootScreen />
</LanguageProvider>
</I18nextProvider>
</PersistGate>
</Provider>
<RecoilRoot>
<I18nextProvider i18n={i18n}>
<LanguageProvider>
<RootScreen />
</LanguageProvider>
</I18nextProvider>
</RecoilRoot>
);

export default App;
Binary file added app/assets/images/wednesday-logo-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/wednesday-logo-old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/images/wednesday-logo.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions app/assets/images/wednesday-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
exports[`<Container /> should render and match the snapshot 1`] = `
<View
style={
{
"display": "flex",
"flexBasis": 0,
"flexGrow": 1,
"flexShrink": 1,
}
[
{
"display": "flex",
"flexBasis": 0,
"flexGrow": 1,
"flexShrink": 1,
},
]
}
testID="container"
/>
Expand Down
18 changes: 0 additions & 18 deletions app/components/atoms/LanguageProvider/actions.js

This file was deleted.

1 change: 0 additions & 1 deletion app/components/atoms/LanguageProvider/constants.js

This file was deleted.

34 changes: 0 additions & 34 deletions app/components/atoms/LanguageProvider/reducer.js

This file was deleted.

16 changes: 0 additions & 16 deletions app/components/atoms/LanguageProvider/selectors.js

This file was deleted.

14 changes: 0 additions & 14 deletions app/components/atoms/LanguageProvider/tests/action.test.js

This file was deleted.

68 changes: 30 additions & 38 deletions app/components/atoms/LanguageProvider/tests/index.test.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
// import React from 'react';
// import { render } from '@testing-library/react-native';
// import { Provider } from 'react-redux';
// import T from '@atoms/T';
// import createStore from 'app/rootReducer';
// import { translationMessages } from 'app/i18n';
// import { renderWithI18next } from '@utils/testUtils';
// import { Text } from 'react-native';
// import ConnectedLanguageProvider, { LanguageProvider } from '../index';
// describe('<LanguageProvider /> container tests', () => {
// it('should render its children', () => {
// const children = (
// <h1>
// <Text>Test</Text>
// </h1>
// );
// const container = renderWithI18next(
// <LanguageProvider messages={translationMessages} locale="en">
// {children}
// </LanguageProvider>
// );
// expect(container.firstChild).not.toBeNull();
// });
// });
// const setupReduxStore = () => ({ reduxStore: createStore().store });
// describe('<ConnectedLanguageProvider /> container tests', () => {
// it('should render the default language messages', () => {
// const { reduxStore } = setupReduxStore();
// const { queryByText } = render(
// <Provider store={reduxStore}>
// <ConnectedLanguageProvider messages={translationMessages}>
// <T id="because" />
// </ConnectedLanguageProvider>
// </Provider>
// );
// expect(queryByText('because')).not.toBeNull();
// });
// });
import React from 'react';
import { render } from '@testing-library/react-native';
import T from '@atoms/T';
import { renderWithI18next } from '@utils/testUtils';
import { Text } from 'react-native';
import ConnectedLanguageProvider, { LanguageProvider } from '../index';
describe('<LanguageProvider /> container tests', () => {
it('should render its children', () => {
const children = (
<h1>
<Text>Test</Text>
</h1>
);
const container = renderWithI18next(
<LanguageProvider>{children}</LanguageProvider>
);
expect(container.firstChild).not.toBeNull();
});
});

describe('<ConnectedLanguageProvider /> container tests', () => {
it('should render the default language messages', () => {
const { queryByText } = render(
<ConnectedLanguageProvider>
<T id="because" />
</ConnectedLanguageProvider>
);
expect(queryByText('because')).not.toBeNull();
});
});
26 changes: 0 additions & 26 deletions app/components/atoms/LanguageProvider/tests/reducer.test.js

This file was deleted.

12 changes: 0 additions & 12 deletions app/components/atoms/LanguageProvider/tests/selectors.test.js

This file was deleted.

Loading

0 comments on commit 05d2991

Please sign in to comment.