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 type { ReactElement } from "react"; | |
import { cloneElement, memo, useCallback } from "react"; | |
import { AlertV2 } from "@/components/AlertV2/alertV2Helpers"; | |
export interface DestructiveActionGuardProps { | |
children: ReactElement<{ onPress: () => void }>; | |
confirmationTitle?: string; | |
confirmationDescription?: string; | |
} |
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
// `storage` is just a MMKV instance from `react-native-mmkv` | |
import { storage } from "@/app/storage"; | |
import { atomWithStorage } from "jotai/utils"; | |
const defaultOpts = { getOnInit: true }; | |
export const atomWithMmkvBooleanStorage = ( | |
key: string, | |
initialValue: boolean | |
) => |
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 { config } from "@/app/config"; | |
import { createLogger } from "@/app/observability"; | |
import { useEffect } from "react"; | |
const { appEnv } = config; | |
const logger = createLogger("developer/storybook"); | |
export const useToggleStorybook = () => { | |
const [isStorybookEnabled, setIsStorybookEnabled] = useState(false) |
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 { BottomSheetModalProvider } from "@gorhom/bottom-sheet"; | |
/** | |
* This gist describes how to build a global alert system that follows a similar | |
* API as RN's Alert.alert(). | |
* | |
* This can be cleaned up and improved, especially in the GlobalAlertManager | |
* side, but it's a good starting point. | |
*/ |
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
# ------------------------------ | |
# First stage: build the app | |
# This includes all dependencies. | |
# ------------------------------ | |
FROM node:16.19-alpine as builder | |
ARG PORT | |
WORKDIR /app |
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
# ------------------------------ | |
# First stage: build the app | |
# ------------------------------ | |
FROM node:16.19-alpine as builder | |
ARG DATABASE_URL | |
ARG DATADOG_API_KEY | |
ARG PORT | |
ARG SENTRY_DSN |
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
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Tests | |
runs-on: ubuntu-latest |
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
{ | |
"idExterno": "fSkHv28beT26PktAL", | |
"ambienteEmissao": "Homologacao", | |
"enviarPorEmail": false, | |
"servico": { | |
"descricao": "17 - CONTORNO TOTAL - R$ 47.00 \nSALAO-PARCEIRO: 41.529.660/0001-41 - COTA PARTE: R$ 28.20 \nPROFISSIONAL-PARCEIRO: 21.465.006/0001-04 - COTA-PARTE R$ 18.80 \n\n", | |
"codigoInternoServicoMunicipal": 25010, | |
"issRetidoFonte": false | |
}, | |
"valorTotal": 47, |
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
Error at PagarMe request { Error: failed [500] {"errors":[{"type":"action_forbidden","parameter_name":null,"message":"Um erro interno aconteceu."}],"url":"/transactions/98301253/refund","method":"post"} | |
at Object.exports.makeErrorByStatus (packages/http.js:176:10) | |
at Request._callback (packages/http.js:140:24) | |
at Request.self.callback (/var/app/current/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22) | |
at emitTwo (events.js:126:13) | |
at Request.emit (events.js:214:7) | |
at Request.<anonymous> (/var/app/current/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10) | |
at emitOne (events.js:116:13) | |
at Request.emit (events.js:211:7) | |
at IncomingMessage.<anonymous> (/var/app/current/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12) |
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
const boletoTransactionSchema = { | |
body: Joi.object() | |
.keys({ | |
model: Joi.string().valid('transaction'), | |
model_id: Joi.string().required(), | |
payload: Joi.string().required() | |
}) | |
.unknown(true) // permite outros campos além dos definidos acima | |
} |
NewerOlder