Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useSearchParams } from 'next/navigation';
import { useRouter } from '@/i18n';
import { obj2Query } from '@/utils/tools';
import type { DevboxEditTypeV2 } from '@/types/devbox';
import type { GpuInventoryModel } from '@/types/gpu';

import Gpu from './Gpu';
import Cpu from './Cpu';
Expand All @@ -25,10 +26,10 @@ import { useEnvStore } from '@/stores/env';

interface FormProps {
isEdit: boolean;
countGpuInventory: (type: string) => number;
gpuInventory: GpuInventoryModel[];
}

const Form = ({ isEdit, countGpuInventory }: FormProps) => {
const Form = ({ isEdit, gpuInventory }: FormProps) => {
const router = useRouter();
const searchParams = useSearchParams();
const t = useTranslations();
Expand Down Expand Up @@ -106,7 +107,7 @@ const Form = ({ isEdit, countGpuInventory }: FormProps) => {
{/* Usage */}
<div className="flex flex-col gap-6 rounded-2xl border border-zinc-200 bg-white p-8">
<span className="text-lg/7 font-medium">{t('usage')}</span>
<Gpu countGpuInventory={countGpuInventory} />
<Gpu gpuInventory={gpuInventory} />
<Cpu />
<Memory />
{showNfs && <NetworkStorage isEdit={isEdit} originalVolumes={originalVolumesRef.current} />}
Expand Down
Loading
Loading