ordering-ui-react-native 0.15.6 → 0.15.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.15.6",
3
+ "version": "0.15.7",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -290,7 +290,15 @@ export const ProductOptionsUI = (props: any) => {
290
290
  }
291
291
  if (img?.video) {
292
292
  const keys = img?.video.split('/')
293
- const _videoId = keys[keys.length - 1]
293
+ let _videoId = keys[keys.length - 1]
294
+ if (_videoId.includes('watch')) {
295
+ const __url = _videoId.split('=')[1]
296
+ _videoId = __url
297
+ }
298
+ if (_videoId.includes('?')) {
299
+ const __url = _videoId.split('?')[0]
300
+ _videoId = __url
301
+ }
294
302
  videoList.push(_videoId)
295
303
  }
296
304
  }