Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
init api on self-serve
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiya1155 committed Jan 15, 2024
1 parent 6c18322 commit 9ba714f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion client/src/CloudApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import packageJson from '../package.json';
import App from './App';
import { LocaleContext } from './context/localeContext';
import i18n from './i18n';
import './index.css';
import {
getPlainFromStorage,
LANGUAGE_KEY,
Expand All @@ -12,9 +13,11 @@ import {
import { LocaleType } from './types/general';
import { DeviceContextProvider } from './context/providers/DeviceContextProvider';
import { EnvContext } from './context/envContext';
import { getConfig } from './services/api';
import { getConfig, initApi } from './services/api';
import { useComponentWillMount } from './hooks/useComponentWillMount';

const CloudApp = () => {
useComponentWillMount(() => initApi('/api', true));
const [envConfig, setEnvConfig] = useState({});
const [locale, setLocale] = useState<LocaleType>(
(getPlainFromStorage(LANGUAGE_KEY) as LocaleType | null) || 'en',
Expand Down
5 changes: 3 additions & 2 deletions client/src/Onboarding/SelfServe/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const SelfServe = () => {
}, []);

return (
<div className="text-label-title">
<div className="fixed top-0 bottom-0 left-0 right-0 z-100 bg-bg-sub select-none">
<div
className={`flex justify-center items-start mt-8 w-screen overflow-auto relative h-[calc(100vh-4rem)]`}
>
Expand All @@ -39,7 +39,8 @@ const SelfServe = () => {
</div>
<a href={loginUrl} className="w-full flex flex-col">
<Button variant="primary" disabled={!loginUrl}>
<GitHubLogo /> <Trans>Sign in with GitHub</Trans>
<GitHubLogo sizeClassName="w-5 h-5" />{' '}
<Trans>Sign in with GitHub</Trans>
</Button>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/src/Project/EmptyProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const EmptyProject = ({}: Props) => {
<p className="body-s text-label-base !leading-5">
<Trans values={{ cmdKey: shortcut?.[0] }}>
Press{' '}
<span className="w-5 h-5 inline-flex items-center justify-center rounded border border-bg-border bg-bg-base shadow-low">
<span className="min-w-[20px] h-5 px-0.5 inline-flex items-center justify-center rounded border border-bg-border bg-bg-base shadow-low">
cmdKey
</span>{' '}
<span className="w-5 h-5 inline-flex items-center justify-center rounded border border-bg-border bg-bg-base shadow-low">
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Header/HeaderRightPart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const HeaderRightPart = ({}: Props) => {
<Button variant="tertiary" size="mini" onClick={openCommandBar}>
<KLetterIcon sizeClassName="w-3.5 h-3.5" className="-translate-y-px" />
<Trans>Actions</Trans>
<span className="text-label-faint">{shortcut?.join('')}</span>
<span className="text-label-faint">{shortcut?.join(' ')}</span>
</Button>
<Dropdown DropdownComponent={UserDropdown} dropdownPlacement="bottom-end">
{envConfig.github_user?.avatar_url ? (
Expand Down

0 comments on commit 9ba714f

Please sign in to comment.