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
| <View style={{}}> | |
| <Text> | |
| <Trans | |
| i18nKey="gift_message" | |
| components={{ | |
| green: ( | |
| <Text style={{ color: 'green', fontWeight: '800' }}> | |
| {''} | |
| </Text> | |
| ), |
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, { useEffect, useRef } from 'react' | |
| import { View } from 'react-native' | |
| import { useQuery, useQueryClient } from '@tanstack/react-query' | |
| import { useIsFocused } from '@react-navigation/native' | |
| export const MyScreen = () => { | |
| const isFocused = useIsFocused(); | |
| const queryClient = useQueryClient(); | |
| const controllerRef = useRef<AbortController | null>(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, { useEffect, useRef, useState } from 'react' | |
| import { View } from 'react-native' | |
| import { useMutation } from '@tanstack/react-query' | |
| export const MyScreen = () => { | |
| const [data, setData] = useState<number[]>([]) | |
| const controllerRef = useRef<AbortController | null>(null); | |
| const getListMutation = useMutation({ | |
| mutationFn: async () => { |
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 perc2color = (perc: number) => { | |
| var r, g, b = 0; | |
| if (perc < 50) { | |
| r = 255; | |
| g = Math.round(5.1 * perc); | |
| } | |
| else { | |
| g = 255; | |
| r = Math.round(510 - 5.10 * perc); | |
| } |