-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Typescript migration * Release notes * Update error boundary * Breakup sidebar components * Account and Sidebar props * Remove button in Item component + exports cleanup * Put accountNameStyle to Account * Revert component ports (separated to another PR) * Export cleanup * Remove ErrorBoundary (separated to another PR) * Sidebar budgetName as ReactNode
- Loading branch information
1 parent
f8ce38f
commit 6fae795
Showing
28 changed files
with
1,007 additions
and
684 deletions.
There are no files selected for viewing
16 changes: 12 additions & 4 deletions
16
...-client/src/components/AnimatedRefresh.js → ...client/src/components/AnimatedRefresh.tsx
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
File renamed without changes.
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
File renamed without changes.
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { type ReactNode, useState } from 'react'; | ||
|
||
type ChildrenProps = { | ||
refreshing: boolean; | ||
onRefresh: () => Promise<void>; | ||
}; | ||
type SyncRefreshProps = { | ||
onSync: () => Promise<void>; | ||
children: (props: ChildrenProps) => ReactNode; | ||
}; | ||
export default function SyncRefresh({ onSync, children }: SyncRefreshProps) { | ||
let [syncing, setSyncing] = useState(false); | ||
|
||
async function onSync_() { | ||
setSyncing(true); | ||
await onSync(); | ||
setSyncing(false); | ||
} | ||
|
||
return children({ refreshing: syncing, onRefresh: onSync_ }); | ||
} |
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
File renamed without changes.
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
Oops, something went wrong.