Skip to content

Commit

Permalink
🗣️ Specify channel ID to update in YPP (#5873)
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Feb 9, 2024
1 parent ba23d39 commit bdfd8ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/atlas/src/hooks/useChannelFormSubmit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ type CreateEditChannelSubmitParams = {
| undefined
}

export const useCreateEditChannelSubmit = () => {
export const useCreateEditChannelSubmit = (initialChannelId?: string) => {
const { joystream, proxyCallback } = useJoystream()
const { channelId, memberId, refetchUserMemberships } = useUser()

const { channelId: activeChannelId, memberId, refetchUserMemberships } = useUser()
const channelId = initialChannelId || activeChannelId
const addNewChannelIdToUploadsStore = useUploadsStore((state) => state.actions.addNewChannelId)
const getBucketsConfigForNewChannel = useBucketsConfigForNewChannel()
const { channelStateBloatBondValue, dataObjectStateBloatBondValue } = useBloatFeesAndPerMbFees()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const YppAuthorizationModal: FC<YppAuthorizationModalProps> = ({ unSynced
[setSelectedChannelId, setYtRequirementsErrors]
)

const createOrUpdateChannel = useCreateEditChannelSubmit()
const createOrUpdateChannel = useCreateEditChannelSubmit(selectedChannelId ?? undefined)

const handleCreateOrUpdateChannel = detailsFormMethods.handleSubmit(async (data) => {
setFinalFormData(() => ({
Expand Down

0 comments on commit bdfd8ae

Please sign in to comment.