Commit d5dc6fb7 authored by Adrian's avatar Adrian
Browse files

Merged master into DetailDev

parents 2b0dfbf6 462d9fde
......@@ -2,8 +2,8 @@
"devToolsPort": 19002,
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 19012,
"expoServerNgrokUrl": "https://av-4mb.anonymous.p4.exp.direct",
"packagerNgrokUrl": "https://packager.av-4mb.anonymous.p4.exp.direct",
"ngrokPid": 7112
"packagerPid": 21696,
"expoServerNgrokUrl": "https://eg-zjk.anonymous.p4.exp.direct",
"packagerNgrokUrl": "https://packager.eg-zjk.anonymous.p4.exp.direct",
"ngrokPid": 9704
}
......@@ -3,6 +3,6 @@
"lanType": "ip",
"dev": true,
"minify": false,
"urlRandomness": "av-4mb",
"urlRandomness": "eg-zjk",
"https": false
}
......@@ -7,6 +7,7 @@ import allReducer from "./src/reducers";
import { Provider } from "react-redux";
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from '@apollo/react-hooks'
import SideMenu from './src/components/SideMenu';
const client = new ApolloClient({
uri: 'http://it2810-26.idi.ntnu.no:4000'
......@@ -30,8 +31,9 @@ export default class App extends Component {
<Provider store={ store }>
<ApolloProvider client={ client }>
<Top/>
<Body/>
</ApolloProvider>
<SideMenu/>
<Body/>
</ApolloProvider>
</Provider>
</View>
);
......
......@@ -1277,6 +1277,47 @@
}
}
},
"@react-navigation/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-3.5.1.tgz",
"integrity": "sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==",
"requires": {
"hoist-non-react-statics": "^3.3.0",
"path-to-regexp": "^1.7.0",
"query-string": "^6.4.2",
"react-is": "^16.8.6"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
"integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
"requires": {
"react-is": "^16.7.0"
}
}
}
},
"@react-navigation/native": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-3.6.2.tgz",
"integrity": "sha512-Cybeou6N82ZeRmgnGlu+wzlV3z5BZQR2dmYaNFV1TNLUGHqtvv8E7oNw9uYcz9Ox5LFbiX+FdNTn2d6ZPlK0kg==",
"requires": {
"hoist-non-react-statics": "^3.0.1",
"react-native-safe-area-view": "^0.14.1",
"react-native-screens": "^1.0.0 || ^1.0.0-alpha"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz",
"integrity": "sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA==",
"requires": {
"react-is": "^16.7.0"
}
}
}
},
"@types/babel__core": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz",
......@@ -2315,6 +2356,11 @@
"integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
"dev": true
},
"clamp": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz",
"integrity": "sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ="
},
"class-utils": {
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
......@@ -2953,6 +2999,14 @@
}
}
},
"eslint-config-prettier": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.5.0.tgz",
"integrity": "sha512-cjXp8SbO9VFGW/Z7mbTydqS9to8Z58E5aYhj3e1+Hx7lS9s6gL5ILKNpCqZAFOVYRcSkWPFYljHrEh8QFEK5EQ==",
"requires": {
"get-stdin": "^6.0.0"
}
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
......@@ -4180,6 +4234,11 @@
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-stdin": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g=="
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
......@@ -5091,6 +5150,11 @@
"integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==",
"dev": true
},
"jest-react-native": {
"version": "18.0.0",
"resolved": "https://registry.npmjs.org/jest-react-native/-/jest-react-native-18.0.0.tgz",
"integrity": "sha1-d92QnwaTJFmfInxYxhwuYhaHJro="
},
"jest-regex-util": {
"version": "24.9.0",
"resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz",
......@@ -5518,6 +5582,11 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"lodash.pad": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz",
......@@ -6901,6 +6970,68 @@
}
}
},
"native-base": {
"version": "2.13.8",
"resolved": "https://registry.npmjs.org/native-base/-/native-base-2.13.8.tgz",
"integrity": "sha512-47Wm7bjH5Dc99gBUeVvsURyADU97aiLMLPGX4ewPgR9kW47TD9slS/Y5vGMToBgz1bsku9anXgN2T1rpdQbpFA==",
"requires": {
"blueimp-md5": "^2.5.0",
"clamp": "^1.0.1",
"color": "~3.1.2",
"create-react-class": "^15.6.3",
"eslint-config-prettier": "^6.0.0",
"fs-extra": "^2.0.0",
"jest-react-native": "^18.0.0",
"lodash": "^4.17.14",
"native-base-shoutem-theme": "0.3.1",
"opencollective-postinstall": "^2.0.2",
"print-message": "^2.1.0",
"prop-types": "^15.5.10",
"react-native-drawer": "2.5.1",
"react-native-easy-grid": "0.2.2",
"react-native-keyboard-aware-scroll-view": "0.9.1",
"react-native-vector-icons": "^6.6.0",
"react-timer-mixin": "^0.13.4",
"react-tween-state": "^0.1.5",
"tween-functions": "^1.0.1"
},
"dependencies": {
"fs-extra": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz",
"integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0"
}
},
"jsonfile": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"requires": {
"graceful-fs": "^4.1.6"
}
}
}
},
"native-base-shoutem-theme": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/native-base-shoutem-theme/-/native-base-shoutem-theme-0.3.1.tgz",
"integrity": "sha512-uwEGhg6gwDuJTHuhNXRKbHtNjni1UI9qfAsVchIqfK7mQAHSNPVU1QRs9Hw6O2K/qLZaP/aJmNoZGc2h2EGSwA==",
"requires": {
"hoist-non-react-statics": "^1.0.5",
"lodash": "^4.17.14",
"prop-types": "^15.5.10"
},
"dependencies": {
"hoist-non-react-statics": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz",
"integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs="
}
}
},
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
......@@ -7382,6 +7513,21 @@
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"requires": {
"isarray": "0.0.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"path-type": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
......@@ -7393,8 +7539,7 @@
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pify": {
"version": "2.3.0",
......@@ -7555,6 +7700,51 @@
"react-is": "^16.8.4"
}
},
"print-message": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/print-message/-/print-message-2.1.0.tgz",
"integrity": "sha1-tViO0IsOG/d6x7y1y3gASvr5qJE=",
"requires": {
"chalk": "1.1.1"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"chalk": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz",
"integrity": "sha1-UJr7ZwZudJn36zU1x3RFdyri0Bk=",
"requires": {
"ansi-styles": "^2.1.0",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
},
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
......@@ -7629,11 +7819,29 @@
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.0.tgz",
"integrity": "sha512-27RP4UotQORTpmNQDX8BHPukOnBP3p1uUJY5UnDhaJB+rMt9iMsok724XL+UHU23bEFOHRMQ2ZhI99qOWUMGFA=="
},
"query-string": {
"version": "6.9.0",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.9.0.tgz",
"integrity": "sha512-KG4bhCFYapExLsUHrFt+kQVEegF2agm4cpF/VNc6pZVthIfCc/GK8t8VyNIE3nyXG9DK3Tf2EGkxjR6/uRdYsA==",
"requires": {
"decode-uri-component": "^0.2.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"querystringify": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
"integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA=="
},
"raf": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
"integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
"requires": {
"performance-now": "^2.1.0"
}
},
"randomatic": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz",
......@@ -7943,6 +8151,22 @@
"tween-functions": "^1.0.1"
}
},
"react-native-dropdown-menu": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/react-native-dropdown-menu/-/react-native-dropdown-menu-2.0.0.tgz",
"integrity": "sha1-HZ5mFNw3mbeeMVH4pU+y2Dx9iZ8=",
"requires": {
"prop-types": "^15.6.1"
}
},
"react-native-easy-grid": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/react-native-easy-grid/-/react-native-easy-grid-0.2.2.tgz",
"integrity": "sha512-MlYrNIldnEMKn6TVatQN1P64GoVlwGIuz+8ncdfJ0Wq/xtzUkQwlil8Uksyp7MhKfENE09MQnGNcba6Mx3oSAA==",
"requires": {
"lodash": "^4.17.15"
}
},
"react-native-elements": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-1.2.7.tgz",
......@@ -7979,6 +8203,33 @@
"prop-types": "^15.7.2"
}
},
"react-native-iphone-x-helper": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz",
"integrity": "sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ=="
},
"react-native-keyboard-aware-scroll-view": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.1.tgz",
"integrity": "sha512-tBZ8rmjELN0F6t5UBp5CW3NYmZXgVnJSzVCssv/OqG2t6kiB+OUTqxNvUP24K+HARX4H+XaW0aEJSFQkQCv6KA==",
"requires": {
"prop-types": "^15.6.2",
"react-native-iphone-x-helper": "^1.0.3"
}
},
"react-native-picker": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/react-native-picker/-/react-native-picker-4.3.7.tgz",
"integrity": "sha1-mELoxi/w2LZ26VFNn5FyQTwFGKg="
},
"react-native-picker-select": {
"version": "6.3.3",
"resolved": "https://registry.npmjs.org/react-native-picker-select/-/react-native-picker-select-6.3.3.tgz",
"integrity": "sha512-9cSXWonugev+e0EHrV8FhzwkjAhpipLFXsGMv+Ns5xI47T9fyNrOXpSeSfgnmycbuAbWRVlJRhJZ9eDGUaNk7w==",
"requires": {
"lodash.isequal": "^4.5.0"
}
},
"react-native-ratings": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-6.5.0.tgz",
......@@ -7993,6 +8244,14 @@
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.3.2.tgz",
"integrity": "sha512-wDxI2N9YLZRmH/n9UIah7RnGSCZJcbKa4mylf2+2pPjicDJAlyjljGAkHOwUlSOol8x14fUp5m65TS9eVZNmZQ=="
},
"react-native-safe-area-view": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz",
"integrity": "sha512-MtRSIcZNstxv87Jet+UsPhEd1tpGe8cVskDXlP657x6rHpSrbrc+y13ZNXrwAgGNNhqQNX7UJT68ZIq//ZRmvw==",
"requires": {
"hoist-non-react-statics": "^2.3.1"
}
},
"react-native-screens": {
"version": "1.0.0-alpha.23",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz",
......@@ -8001,6 +8260,11 @@
"debounce": "^1.2.0"
}
},
"react-native-shapes": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/react-native-shapes/-/react-native-shapes-0.1.0.tgz",
"integrity": "sha512-5EHcc/Burlvp2UdfzT+EkQqGn7WO6SQGxZ9w0/4BWYMB/bShA8/lnhuWgxQz+IxZwxnzPkYiR4zCS2NlQQJGig=="
},
"react-native-simple-radio-button": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/react-native-simple-radio-button/-/react-native-simple-radio-button-2.7.4.tgz",
......@@ -8068,6 +8332,20 @@
"react-timer-mixin": "^0.13.4"
}
},
"react-navigation": {
"version": "4.0.10",
"resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-4.0.10.tgz",
"integrity": "sha512-7PqvmsdQ7HIyxPUMYbd9Uq//VoMdniEOLAOSvIhb/ExtbAt/1INSjUF+RiMWOMCWLTCNvNPRvTz7xy7qwWureg==",
"requires": {
"@react-navigation/core": "^3.5.1",
"@react-navigation/native": "^3.6.2"
}
},
"react-navigation-drawer": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/react-navigation-drawer/-/react-navigation-drawer-2.3.3.tgz",
"integrity": "sha512-d/rA8Slqv7HoMfONKVDBQUrRF7YQH796Gzal/KOhaY4VOwUUqIwfxMRJ3WrsdL2OkDPixtkXJE2Fz6KAj658uA=="
},
"react-proxy": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-1.1.8.tgz",
......@@ -8144,6 +8422,15 @@
"react-proxy": "^1.1.7"
}
},
"react-tween-state": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/react-tween-state/-/react-tween-state-0.1.5.tgz",
"integrity": "sha1-6YsGZVHvuTy5LdG+FJlcLj3q4zk=",
"requires": {
"raf": "^3.1.0",
"tween-functions": "^1.0.1"
}
},
"read-pkg": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
......@@ -8898,6 +9185,11 @@
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
},
"split-on-first": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
......@@ -9047,6 +9339,11 @@
"resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
"integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ="
},
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
},
"string-length": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz",
......
......@@ -13,18 +13,25 @@
"expo": "^35.0.0",
"graphql": "^14.5.8",
"graphql-tag": "^2.10.1",
"native-base": "^2.13.8",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "0.59.10",
"react-native-drawer": "^2.5.1",
"react-native-dropdown-menu": "^2.0.0",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "~1.4.1",
"react-native-picker": "^4.3.7",
"react-native-picker-select": "^6.3.3",
"react-native-reanimated": "~1.3.0",
"react-native-screens": "1.0.0-alpha.23",
"react-native-shapes": "^0.1.0",
"react-native-simple-radio-button": "^2.7.4",
"react-native-unimodules": "0.6.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "^0.11.7",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.3",
"react-redux": "^7.1.1",
"redux": "^4.0.4"
},
......
......@@ -58,12 +58,19 @@ export const defaultPage = () => {
export const isOverlayVisible = () => {
return{
type : 'VISIBLE',
}
type : 'VISIBLE'
}
}
export const toggleSideMenu = () => {
return{
type : 'SIDEMENU',
type : 'SIDEMENU'
}
}
export const sortingCategory = (a) => {
return {
type : 'SORT',
payload : a
}
}
\ No newline at end of file
......@@ -3,19 +3,17 @@ import React from 'react';
import { Text, StyleSheet, ScrollView, Image } from 'react-native';
import Search from './Search';
import Content from './Content'
import Filtering from './Filtering'
import SideMenuComp from './SideMenu'
import Sorting from './Sorting';
//import Content from '../Content/Content.js';
//import Wordcloud from '../Wordcloud/Wordcloud.js';
const Body = () => {
return(
<ScrollView>
<ScrollView style={{height:"90%"}}>
<Search/>
<Sorting/>
<Content/>
<Filtering/>
</ScrollView>
);
}
......
import React from "react";
import { Text, StyleSheet, ScrollView, Image, View, Button } from "react-native";
import {
Text,
StyleSheet,
ScrollView,
Image,
View,
Button
} from "react-native";
import Search from "./Search";
import { ListItem } from "react-native-elements";
import { useSelector } from "react-redux";
......@@ -18,9 +25,15 @@ const GET_PRODUCTS = gql`
$sort: String
$search: String
$filters: FilterInputObject
$skip:Int
$skip: Int
) {
products(limit: $limit, sort: $sort, search: $search, filters: $filters, skip:$skip) {
products(
limit: $limit
sort: $sort
search: $search
filters: $filters
skip: $skip
) {
products {
name
price
......@@ -40,46 +53,61 @@ const GET_PRODUCTS = gql`
const Content = () => {
const dispatch = useDispatch();
const stateSearch = useSelector(state => state.search);
const stateGenre = useSelector(state => state.filter);
const stateType = useSelector(state => state.filter);
const stateSort = useSelector(state => state.sortingCategory);
const statePage = useSelector(state => state.page);
function checkStateTypeEmpty() {
let isStateTypeEmpty = stateType == "";
return isStateTypeEmpty ? {} : { filterType: stateType };
}
const { loading, error, data, fetchMore } = useQuery(GET_PRODUCTS, {
variables: { limit: 15, search: stateSearch, sort: "-volume"}
variables: {
limit: 15,
search: stateSearch,
sort: stateSort,
filters: checkStateTypeEmpty()
}
});
if (loading) return <Text> Loading ... </Text>;
if (error) return <Text> {error} </Text>;
if (loading) return <Text>Loading ...</Text>;
if (error) return <Text>{error}</Text>;
const { products } = data.products;
const handleLoadMore = () => {
dispatch(nextPage());
fetchMore({variables : {