-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db8901a
commit 30bc3d4
Showing
5 changed files
with
31 additions
and
32 deletions.
There are no files selected for viewing
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
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
10 changes: 6 additions & 4 deletions
10
src/packages/v4/views/V4ProjectSettings/hooks/useSettingsPagePath.ts
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 |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { useJBContractContext } from 'juice-sdk-react' | ||
import { useCurrentRouteChainId } from 'packages/v4/hooks/useCurrentRouteChainId' | ||
import { settingsPagePath } from 'packages/v4/utils/routes' | ||
import { useChainId } from 'wagmi' | ||
import { SettingsPageKey } from '../ProjectSettingsDashboard' | ||
|
||
export function useSettingsPagePath(key?: SettingsPageKey) { | ||
const { projectId } = useJBContractContext() | ||
const chainId = useChainId() | ||
const chainId = useCurrentRouteChainId() | ||
if (!chainId) { | ||
return undefined | ||
} | ||
|
||
return settingsPagePath({ projectId: Number(projectId), chainId }, key, ) | ||
return settingsPagePath({ projectId: Number(projectId), chainId }, key) | ||
} |