buy service call back url
This commit is contained in:
@@ -21,7 +21,6 @@ export async function generateMetadata(
|
||||
|
||||
await queryClient.prefetchQuery(getProductBySlugQueryOptions(id))
|
||||
const service = queryClient.getQueryData(getProductBySlugQueryOptions(id).queryKey) as ServiceDetailResponse
|
||||
console.log('service', service);
|
||||
|
||||
return {
|
||||
title: 'محصولات داناک' + ' | ' + service.data.danakService.name,
|
||||
|
||||
@@ -9,12 +9,14 @@ import { DanakService } from '../types/ProductTypes'
|
||||
import RadioGroup from '@/components/RadioGroup'
|
||||
import Image from 'next/image'
|
||||
import { CONSOLE_URL } from '@/config/const'
|
||||
import { useSharedStore } from '@/shared/store/sharedStore'
|
||||
type Props = {
|
||||
data: DanakService,
|
||||
}
|
||||
|
||||
const ServiceHeader: FC<Props> = (props: Props) => {
|
||||
|
||||
const { isLogin } = useSharedStore()
|
||||
const { data } = props
|
||||
const [planSelected, setPlanSelected] = useState<string>(data?.subscriptionPlans[0]?.id)
|
||||
const [price, setPrice] = useState<number>(data?.subscriptionPlans[0]?.price)
|
||||
@@ -86,7 +88,7 @@ const ServiceHeader: FC<Props> = (props: Props) => {
|
||||
</div>
|
||||
<span>تومان</span>
|
||||
</div>
|
||||
<Link target='_blank' href={`${CONSOLE_URL}/other-service/buy/${data?.id}/${planSelected}`}>
|
||||
<Link target='_blank' href={`${isLogin ? CONSOLE_URL + `/other-service/buy/${data?.id}/${planSelected}` : CONSOLE_URL + '/auth/login'}?redirect=${CONSOLE_URL}/other-service/buy/${data?.id}/${planSelected}`}>
|
||||
<Button
|
||||
// onClick={handleBuy}
|
||||
// isLoading={buyService.isPending}
|
||||
|
||||
Reference in New Issue
Block a user