-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENG-4662 feat(portal,1ui,graphql): update query in create identity modal #889
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useQuery } from '@tanstack/react-query' | ||
|
||
export type CreateConfigData = { | ||
vaultId: string | ||
atomCost: string | ||
atomCreationFee: string | ||
tripleCost: string | ||
protocolFee: string | ||
entryFee: string | ||
feeDenominator: string | ||
minDeposit: string | ||
} | ||
|
||
export function useCreateConfig() { | ||
return useQuery<CreateConfigData>({ | ||
queryKey: ['create-config'], | ||
queryFn: async () => { | ||
const response = await fetch('/resources/create') | ||
if (!response.ok) { | ||
throw new Error('Failed to fetch create config') | ||
} | ||
return response.json() | ||
}, | ||
}) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
}, | ||
"devDependencies": { | ||
"@0no-co/graphqlsp": "^1.12.16", | ||
"dotenv-cli": "^7.4.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this dependency? Curious if it was needed for something you ran into Edit: saw codegen comment. What error? Did you run from the root? Also did you run to add any new queries? Trying to see if this is an issue we can solve without adding this as a dependency- I haven't had issues with codegen but if you saw errors lmk There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is what I was seeing, added dotenv-cli to devDependencies based on Claudes comments. I think I could have installed it locally and it would have worked. Can remove it though if we need to. I'm assuming you must have it installed on your local machine? |
||
"@graphql-codegen/cli": "^5.0.3", | ||
"@graphql-codegen/client-preset": "^4.4.0", | ||
"@graphql-codegen/introspection": "^4.0.3", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Good idea!