brew update
brew install pyenv
export PYENV_ROOT="$HOME/.pyenv"
if ( | |
PRODUCTION_ENV && | |
request.headers.get("x-forwarded-proto") !== "https" | |
) { | |
const hostname = request.headers.get("host") || request.nextUrl.hostname; | |
return NextResponse.redirect( | |
`https://${hostname}${request.nextUrl.pathname}` | |
); | |
} |
const { query } = router | |
const queryParams = { | |
[field]: [value]?.concat?.(query[field] || []) | |
} | |
router.replace({ | |
query: { ...query, ...queryParams }, | |
}); |
import { TextField } from '@mui/material'; | |
import Autocomplete from '@mui/material/Autocomplete'; | |
import { useFormikContext } from 'formik'; | |
import React from 'react'; | |
type OptionsValues = { | |
title: string, | |
value: string | |
} |
name: ci | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: |
version: '3.9' | |
services: | |
postgres: | |
image: 'postgres:13' | |
ports: | |
- '5432:5432' | |
volumes: | |
- postgres:/data/db | |
environment: |
import React from 'react' | |
const Context = React.createContext({}) | |
const withContext = Component => props => { | |
const [state, setState] = React.useState() | |
return ( | |
<Context.Provider value={[state, setState]}> | |
<Component {...props} /> |
import React from 'react' | |
import { render } from '@testing-library/react' | |
import { createStore } from 'redux' | |
import { Provider } from 'react-redux' | |
import reducers from 'your-reducers' | |
function renderWithRedux( | |
ui, | |
{ initialState, store = createStore(reducers, initialState) } = {} | |
) { |