This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function request() { | |
let options = { | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
'Authorization': '4f2a8bb583700b1291763f0832d718b628e9abea813b5119616d7b12aa1fb531' | |
}, | |
} | |
return fetch('http://localhost:3000/api/user', options) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import * as React from "react"; | |
function useSelect( | |
initialValue: string | number, | |
items: Array<{ label: string, value: string | number }>, | |
) { | |
const [value, setValue] = React.useState(initialValue); | |
function onChangeValue(value: string) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
key: "reserve", | |
url: "http://whatever.com/?menu=reserve", | |
label: "Reserve", | |
}, { | |
key: "website", | |
url: "http://someothersite.com", | |
label: "Visit Website", | |
}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Control, Controller} from 'react-hook-form'; | |
import {TextInputProps} from 'react-native'; | |
import styled from 'styled-components/native'; | |
type InputType = 'text' | 'password' | 'email'; | |
interface InputProps extends TextInputProps { | |
type?: InputType; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reducers setup | |
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
import { persistCombineReducers } from "redux-persist"; | |
const config = { | |
key: STORAGE_PREFIX, | |
debug: ENV === "development", | |
storage: AsyncStorage, | |
}; |
OlderNewer