Skip to content

Commit

Permalink
Fix CLI and run health check
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyxiao committed Sep 15, 2022
1 parent a8174b5 commit e4042ee
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
KV_STORE='postgres'
POSTGRES_URL="postgres://@localhost/postgres"
PLAID_CREDENTIALS='{
"client_id": "",
Expand Down Expand Up @@ -39,3 +38,4 @@ YODLEE_CREDS='{
"loginName": "...",
"providerAccountId": 10706352
}'
JWT_SECRET_OR_PUBLIC_KEY=''
3 changes: 3 additions & 0 deletions .github/workflows/validate-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: Run type checks
run: pnpm run typecheck

- name: Run health check
run: ./bin/ledgerSync health

- name: Generate assets required for lint
run: pnpm --dir ./apps/next/ run generate:css

Expand Down
14 changes: 0 additions & 14 deletions apps/next/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,3 @@ export default function MyApp({Component, pageProps}: AppProps) {
</>
)
}

/**
* Used to create a callback to get the current value without re-rendering
* whenever value changes...
*
* TODO: Move me to frontend utils...
*/
export function useGetter<T>(value: T) {
const ref = React.useRef(value)
React.useEffect(() => {
ref.current = value
}, [value, ref])
return React.useCallback(() => ref.current, [ref])
}
15 changes: 14 additions & 1 deletion packages/engine-frontend/LSProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import type {AnySyncRouter, SyncEngineConfig} from '@ledger-sync/engine-backend'
import {zUserInfo} from '@ledger-sync/engine-backend/auth-utils'
import {R} from '@ledger-sync/util'

import {useGetter} from '../../apps/next/pages/_app'
import type {DialogInstance} from './components/Dialog'
import {Dialog} from './components/Dialog'

Expand Down Expand Up @@ -183,3 +182,17 @@ LSProvider.config = <
// // Improve typing to omit options.config.url, it is a noop
// config: (info) => ({...options.config(info), url: routerUrl}),
// })

/**
* Used to create a callback to get the current value without re-rendering
* whenever value changes...
*
* TODO: Move me to frontend utils...
*/
export function useGetter<T>(value: T) {
const ref = React.useRef(value)
React.useEffect(() => {
ref.current = value
}, [value, ref])
return React.useCallback(() => ref.current, [ref])
}

0 comments on commit e4042ee

Please sign in to comment.