mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 21:42:27 +08:00
feat(video): pass provider prop to VideoPanel component
Add useProvider hook to fetch provider data and pass it to VideoPanel to enable provider-specific functionality
This commit is contained in:
parent
dc19c17526
commit
dad9425b44
@ -2,6 +2,7 @@
|
||||
|
||||
import { Divider } from '@heroui/react'
|
||||
import { Navbar, NavbarCenter } from '@renderer/components/app/Navbar'
|
||||
import { useProvider } from '@renderer/hooks/useProvider'
|
||||
import { SystemProviderIds } from '@renderer/types'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -14,6 +15,7 @@ export const VideoPage = () => {
|
||||
const { t } = useTranslation()
|
||||
const [providerId, setProviderId] = useState<string>(SystemProviderIds.openai)
|
||||
const [modelId, setModelId] = useState('sora-2')
|
||||
const { provider } = useProvider(providerId)
|
||||
return (
|
||||
<div className="flex flex-1 flex-col">
|
||||
<Navbar>
|
||||
@ -26,7 +28,7 @@ export const VideoPage = () => {
|
||||
<ModelSetting providerId={providerId} modelId={modelId} setModelId={setModelId} />
|
||||
</div>
|
||||
<Divider orientation="vertical" />
|
||||
<VideoPanel />
|
||||
<VideoPanel provider={provider} />
|
||||
<Divider orientation="vertical" />
|
||||
{/* Video list */}
|
||||
<div className="w-40"></div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user