mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
update to match with changes in api
This commit is contained in:
1 parent
cf64f41230
commit
e8649f43b1
7 files changed
+695
-257
No files matched your search
@@ -23,7 +23,7 @@ const CreatePipelineModal = ({ visible, onClose }: CreatePipelineModalProps) =>
|
||||
projectRef: ref,
|
||||
})
|
||||
|
||||
let thisProjectSource = data?.find((s) => s.name === ref)
|
||||
let thisProjectSource = data?.sources?.find((s) => s.name === ref)
|
||||
|
||||
if (!thisProjectSource) {
|
||||
toast.error("Failed to find this project's source")
|
||||
@@ -32,7 +32,7 @@ const CreatePipelineModal = ({ visible, onClose }: CreatePipelineModalProps) =>
|
||||
const { data: sinks_data } = useReplicationSinksQuery({
|
||||
projectRef: ref,
|
||||
})
|
||||
const sinks = sinks_data ?? []
|
||||
const sinks = sinks_data ? sinks_data.sinks : []
|
||||
|
||||
const { data: pub_data } = useReplicationPublicationsQuery({
|
||||
projectRef: ref,
|
||||
|
||||
@@ -22,7 +22,7 @@ export const ReplicationPipelines = () => {
|
||||
const [showDeletePipelineModal, setShowDeletePipelineModal] = useState(false)
|
||||
const [pipelineIdToDelete, setPipelineIdToDelete] = useState(-1)
|
||||
|
||||
const pipelines = pipelines_data ?? []
|
||||
const pipelines = pipelines_data ? pipelines_data.pipelines : []
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -21,7 +21,7 @@ export const ReplicationPublications = () => {
|
||||
const [showDeletePublicationModal, setShowDeletePublicationModal] = useState(false)
|
||||
const [publicationToDelete, setPublicationToDelete] = useState('')
|
||||
|
||||
const sources = sources_data ?? []
|
||||
const sources = sources_data ? sources_data.sources : []
|
||||
const thisProjectSource = sources.find((s) => s.name === ref)
|
||||
|
||||
const { data: pub_data } = useReplicationPublicationsQuery({
|
||||
|
||||
@@ -21,7 +21,7 @@ export const ReplicationSinks = () => {
|
||||
const [sinkIdToDelete, setSinkIdToDelete] = useState(-1)
|
||||
const [sinkNameToDelete, setSinkNameToDelete] = useState('')
|
||||
|
||||
const sinks = sinks_data ?? []
|
||||
const sinks = sinks_data ? sinks_data.sinks : []
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -25,7 +25,7 @@ async function fetchReplicationPublications(
|
||||
handleError(error)
|
||||
}
|
||||
|
||||
return data.filter((pub) => pub.name !== 'supabase_realtime')
|
||||
return data.publications.filter((pub) => pub.name !== 'supabase_realtime')
|
||||
}
|
||||
|
||||
export type ReplicationPublicationsData = Awaited<ReturnType<typeof fetchReplicationPublications>>
|
||||
|
||||
@@ -18,7 +18,7 @@ const PageLayout: NextPageWithLayout = () => {
|
||||
projectRef: ref,
|
||||
})
|
||||
|
||||
let replicationEnabled = data ? data?.length !== 0 && data[0].name === ref : false
|
||||
let replicationEnabled = data ? data?.sources?.length !== 0 && data.sources[0].name === ref : false
|
||||
|
||||
const { mutate: createSource, isLoading: isCreating } = useCreateSourceMutation({
|
||||
onSuccess: () => {
|
||||
|
||||
Vendored
+688
-250
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user