Skip to content
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

Merged
merged 6 commits into from
Aug 31, 2024
Merged

Conversation

adityachoudhari26
Copy link
Contributor

No description provided.

@@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats this state=sLtHqpxQ6FiUtBWJ

Comment on lines 35 to 36
const githubBotName = api.runtime.github.bot.name.useQuery();
const githubBotClientId = api.runtime.github.bot.clientId.useQuery();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

@adityachoudhari26 adityachoudhari26 merged commit 933eea0 into main Aug 31, 2024
7 checks passed
@adityachoudhari26 adityachoudhari26 deleted the browswer-env-fix branch August 31, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants