Skip to content

Instantly share code, notes, and snippets.

Avatar

Aman Mittal amandeepmittal

View GitHub Profile
@amandeepmittal
amandeepmittal / authors.js
Created Oct 1, 2021
mock data for authors
View authors.js
export const AUTHORS = [
{
title: 'David Banner',
description:
'American rapper, record producer and activist from Mississippi',
dateOfBirth: '1974-04-11T00:00:00Z',
image_url:
'http://commons.wikimedia.org/wiki/Special:FilePath/David%20Banner%20at%20FOB%20Brassfield-Mora%202009-01-26%203.jpg',
placeOfBirth: 'Jackson',
articleUrl: 'https://en.wikipedia.org/wiki/David_Banner',
View books.js
export const BOOKS = [
{
id: 1,
title: 'The Hunger Games',
authors: 'Suzanne Collins',
description:
"Winning will make you famous. Losing means certain death.The nation of Panem, formed from a post-apocalyptic North America, is a country that consists of a wealthy Capitol region surrounded by 12 poorer districts. Early in its history, a rebellion led by a 13th district against the Capitol resulted in its destruction and the creation of an annual televised event known as the Hunger Games. In punishment, and as a reminder of the power and grace of the Capitol, each district must yield one boy and one girl between the ages of 12 and 18 through a lottery system to participate in the games. The 'tributes' are chosen during the annual Reaping and are forced to fight to the death, leaving only one survivor to claim victory.When 16-year-old Katniss's young sister, Prim, is selected as District 12's female representative, Katniss volunteers to take her place. She and her male counterpart Peeta,
View .eslintrc.js
rules: {
'prettier/prettier': ['error'],
'no-use-before-define': 0,
'react/forbid-prop-types': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-fragments': 0,
'react/jsx-props-no-spreading': 0,
'react/style-prop-object': 0,
'react/require-default-props': 0,
'react/prop-types': 0,
View camera-video.js
import React, { useState, useRef, useEffect } from 'react';
import {
StyleSheet,
Dimensions,
View,
Text,
TouchableOpacity
} from 'react-native';
import { Camera } from 'expo-camera';
import { Video } from "expo-av";
View Details.js
import React, { useRef } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity,
ScrollView,
Image,
Dimensions
} from 'react-native';
View App.js
import 'react-native-gesture-handler';
import React from 'react';
import RootNavigator from './src/navigation/RootNavigator';
import { AuthenticatedUserProvider } from './src/navigation/AuthenticatedUserProvider';
const App = () => {
return (
<AuthenticatedUserProvider>
<RootNavigator />
View FoodList.js
import React, { useState } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
Image,
ScrollView
} from 'react-native';
import { AntDesign } from '@expo/vector-icons';
View App.js
import React from 'react';
import logo from './logo.svg';
import './App.css';
import { useHarperDB } from 'use-harperdb';
function App() {
const [data, loading, error, refresh] = useHarperDB({
query: { operation: 'sql', sql: 'select * from dev.books' }
});
View log.shell
Starting build
Download project archive
Unpacking project archive
Running yarn
yarn install v1.17.3
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
View CustomText.js
// RN or Expo apps
import React from 'react';
import { Text as RNText, StyleSheet } from 'react-native';
import { Typography, FontWeight } from '@config';
export default function Text({
header = false,
title1 = false,