-
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
fix: Use runtime envs and pass to fe #11
Conversation
@@ -58,6 +70,8 @@ export const GithubOrgConfig: React.FC<{ | |||
const [value, setValue] = useState<string | null>(null); | |||
const [image, setImage] = useState<string | null>(null); | |||
|
|||
const baseUrl = api.runtime.baseUrl.useQuery(); |
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.
const baseUrl = api.runtime.baseUrl.useQuery(); | |
const baseUrl = api.runtime.baseUrl.useQuery(); |
I though we would do something like runtime.useQuery() and it return an obj
userId?: string, | ||
workspaceSlug?: string, | ||
) => | ||
`${githubUrl}/login/oauth/authorize?response_type=code&client_id=${clientId}&redirect_uri=${baseUrl}/api/github/${userId}/${workspaceSlug}&state=sLtHqpxQ6FiUtBWJ&scope=repo%2Cread%3Auser`; |
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.
whats this state=sLtHqpxQ6FiUtBWJ
const githubBotName = api.runtime.github.bot.name.useQuery(); | ||
const githubBotClientId = api.runtime.github.bot.clientId.useQuery(); |
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.
const githubBotName = api.runtime.github.bot.name.useQuery(); | |
const githubBotClientId = api.runtime.github.bot.clientId.useQuery(); | |
const{data: {name, clientId}} = api.runtime.github.bot.useQuery(); |
I would simplify
No description provided.