Download webui/src/features/vercel/VercelSyncContainer.jsx from a3216/ds2api: direct link, hf CLI and curl.
- Browser
- Download file 2.43 kB
-
https://huggingface.co/spaces/a3216/ds2api/resolve/ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/features/vercel/VercelSyncContainer.jsx
- Command line
-
hf download hf://spaces/a3216/ds2api@ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/features/vercel/VercelSyncContainer.jsx
-
curl -L -o VercelSyncContainer.jsx https://huggingface.co/spaces/a3216/ds2api/resolve/ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/features/vercel/VercelSyncContainer.jsx
2.43 kB
| import { useI18n } from '../../i18n' | |
| import { useVercelSyncState } from './useVercelSyncState' | |
| import VercelSyncForm from './VercelSyncForm' | |
| import VercelSyncStatus from './VercelSyncStatus' | |
| import VercelGuide from './VercelGuide' | |
| export default function VercelSyncContainer({ onMessage, authFetch, isVercel = false, config = null }) { | |
| const { t } = useI18n() | |
| const apiFetch = authFetch || fetch | |
| const { | |
| vercelToken, | |
| setVercelToken, | |
| projectId, | |
| setProjectId, | |
| teamId, | |
| setTeamId, | |
| saveCredentials, | |
| setSaveCredentials, | |
| configSource, | |
| handleConfigSourceChange, | |
| localConfig, | |
| localConfigName, | |
| localConfigError, | |
| handleLocalConfigSelect, | |
| clearLocalConfig, | |
| loading, | |
| result, | |
| preconfig, | |
| syncStatus, | |
| pollPaused, | |
| pollFailures, | |
| handleManualRefresh, | |
| handleSync, | |
| } = useVercelSyncState({ | |
| apiFetch, | |
| onMessage, | |
| t, | |
| isVercel, | |
| config, | |
| }) | |
| return ( | |
| <div className="grid grid-cols-1 lg:grid-cols-2 gap-8 max-w-5xl mx-auto h-[calc(100vh-140px)]"> | |
| <VercelSyncForm | |
| t={t} | |
| syncStatus={syncStatus} | |
| pollPaused={pollPaused} | |
| pollFailures={pollFailures} | |
| onManualRefresh={handleManualRefresh} | |
| preconfig={preconfig} | |
| vercelToken={vercelToken} | |
| setVercelToken={setVercelToken} | |
| projectId={projectId} | |
| setProjectId={setProjectId} | |
| teamId={teamId} | |
| setTeamId={setTeamId} | |
| saveCredentials={saveCredentials} | |
| setSaveCredentials={setSaveCredentials} | |
| configSource={configSource} | |
| onConfigSourceChange={handleConfigSourceChange} | |
| localConfig={localConfig} | |
| localConfigName={localConfigName} | |
| localConfigError={localConfigError} | |
| onLocalConfigSelect={handleLocalConfigSelect} | |
| onLocalConfigClear={clearLocalConfig} | |
| loading={loading} | |
| onSync={handleSync} | |
| /> | |
| <div className="space-y-6"> | |
| <VercelSyncStatus t={t} result={result} /> | |
| <VercelGuide t={t} /> | |
| </div> | |
| </div> | |
| ) | |
| } | |