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
{ | |
"userinfo_country_code": { | |
"0": "請選擇", | |
"US": "美國 (+1)", | |
"CA": "加拿大 (+1)", | |
"UK": "英國 (+44)", | |
"AF": "阿富汗 (+93)", | |
"AR": "阿根廷 (+54)", | |
"AT": "奧地利 (+43)", |
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
{ | |
"userinfo_country_code": { | |
"0": "請選擇", | |
"US": "美國 (+1)", | |
"CA": "加拿大 (+1)", | |
"UK": "英國 (+44)", | |
"AF": "阿富汗 (+93)", | |
"AR": "阿根廷 (+54)", | |
"AT": "奧地利 (+43)", |
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
const locationOption = { | |
countryType: [{ key: "TW", label: "台灣", active: true }], | |
cityType: { | |
TW: [ | |
{ key: "KLU", label: "基隆市", active: true }, | |
{ key: "TPH", label: "新北市", active: true }, | |
{ key: "TPE", label: "臺北市", active: true }, | |
{ key: "TYC", label: "桃園市", active: true }, | |
{ key: "HSH", label: "新竹縣", active: true }, | |
{ key: "HSC", label: "新竹市", active: true }, |
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 { useState, useCallback } from "react"; | |
type Resolver = ((value: string) => void) | null; | |
type Rejecter = ((reason?: any) => void) | null; | |
const useAsyncDialog = () => { | |
const [show, setShow] = useState<boolean>(false); | |
const [resolver, setResolver] = useState<Resolver>(null); | |
const [rejecter, setRejecter] = useState<Rejecter>(null); |
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, { useState, useRef, useCallback } from "react"; | |
import CustomModal from "../component/CustomModal"; | |
type Resolver = ((value?: unknown) => void) | null; | |
type Rejecter = ((reason?: any) => void) | null; | |
const useAsyncDialog = ({ | |
title, | |
paragraph, | |
confirm, |
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, { useState, FC } from "react"; | |
import { Button, Modal } from "react-bootstrap"; | |
import "./styles.css"; | |
import CustomModal from "./component/CustomModal"; | |
export default function App() { | |
const [show, setShow] = useState(false); | |
const handleConfirm = () => { | |
alert("Do something when user confirm"); |
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
{"lastUpload":"2021-03-29T02:31:31.047Z","extensionVersion":"v3.4.3"} |
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
{"lastUpload":"2021-03-29T02:53:00.542Z","extensionVersion":"v3.4.3"} |
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
declare module "react-native-config" { | |
export interface Env { | |
ENVIRONMENT: "development" | "production"; | |
} | |
export const Config: Env; | |
export default Config; | |
} |
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, { | |
ComponentProps, | |
useCallback, | |
useEffect, | |
useMemo, | |
useRef, | |
useState, | |
} from "react"; | |
import { | |
StyleSheet, |
NewerOlder