buy service call back url

This commit is contained in:
hamid zarghami
2025-05-11 14:26:23 +03:30
parent 0c3fdc23f7
commit f50fdf03e2
2 changed files with 3 additions and 2 deletions
@@ -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}