This file contains 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 { Dimensions, PixelRatio } from 'react-native' | |
const guidelineBaseWidth = 390 | |
const guidelineBaseHeight = 844 | |
const { height, width } = Dimensions.get('window') | |
/** | |
* | |
* @param size: fontSize of text | |
* @returns re-calculate fontSize of text | |
*/ | |
export function normalize(fontSize: number): number { |
This file contains 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
version: "3" | |
services: | |
mysql: | |
image: mysql:5.7 | |
container_name: mysql | |
environment: | |
MYSQL_DATABASE: 'mysql' | |
# We cannot set user as 'root' if mysql is below version of 5.x: https://github.com/docker-library/mysql/issues/129 | |
# MYSQL_USER: 'root' |
This file contains 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
server { | |
server_name quizzes.vfftech.com vumax.me; | |
access_log /var/log/nginx/app.log; | |
error_log /var/log/nginx/app.error.log; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_pass http://localhost:3000; |
This file contains 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
- (NSString *)operationDefinition{ | |
return [NSString stringWithFormat: | |
@"query getListCollection{" | |
" collectionOfCategory(category_id:%d,page: %d, where: %@) {" | |
" data {" | |
" name" | |
" id" | |
" description" | |
" image" | |
" classes {" |
This file contains 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
/* in src/api | |
package.json | |
API.JS | |
Const.js | |
*/ | |
{ | |
"name": "@api" | |
} |
This file contains 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 "./style.css"; | |
import useApi from "./useApi.js"; | |
import Loader from "./Loader"; | |
const { useRef, useEffect } = React; | |
export default function TodoList(props) { | |
const BASE_URL = `https://guysgv.wixsite.com/todo-api/_functions/todo/${ | |
props.selectedList.id | |
}`; |
This file contains 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
export const mergeRefs = (...refs) => { | |
const filteredRefs = refs.filter(Boolean); | |
if (!filteredRefs.length) return null; | |
if (filteredRefs.length === 0) return filteredRefs[0]; | |
return inst => { | |
for (const ref of filteredRefs) { | |
if (typeof ref === 'function') { | |
ref(inst); | |
} else if (ref) { | |
ref.current = inst; |
NewerOlder