title pages and ...
This commit is contained in:
+14
-1
@@ -5,6 +5,19 @@ import React from 'react'
|
||||
import Accordion from '@/components/Accordion'
|
||||
import WhyDanak from '../home/WhyDanak'
|
||||
|
||||
export const metadata = {
|
||||
title: 'داناک | درباره ما',
|
||||
description: 'درباره ما',
|
||||
openGraph: {
|
||||
title: 'داناک | درباره ما',
|
||||
description: 'درباره ما',
|
||||
url: 'https://danakcorp.com/about',
|
||||
siteName: 'داناک',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
}
|
||||
|
||||
const About: NextPage = () => {
|
||||
return (
|
||||
<div className='mt-24'>
|
||||
@@ -62,7 +75,7 @@ const About: NextPage = () => {
|
||||
مشاوره استقرار ISMS
|
||||
</div>
|
||||
<div className='flex-1 xl:min-w-[30%] min-w-[90%] bg-[#ECEFF6] h-10 rounded-xl font-bold flex justify-center items-center'>
|
||||
نظام صنفی
|
||||
نظام صنفی رایانه ای
|
||||
</div>
|
||||
<div className='flex-1 xl:min-w-[30%] min-w-[90%] bg-[#ECEFF6] h-10 rounded-xl font-bold flex justify-center items-center'>
|
||||
GDPR
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { Metadata } from 'next'
|
||||
import { Suspense } from 'react'
|
||||
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'
|
||||
import { blogSingleQueryOptions, mostVisitedBlogsQueryOptions } from '../hooks/useBlogsData'
|
||||
import { NextPage } from 'next'
|
||||
import SingleBlogPage from '../components/SingleBlogPage'
|
||||
import Loading from './loading'
|
||||
import { BlogSingleResponse } from '../types/BlogTypes'
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{
|
||||
@@ -11,6 +13,21 @@ interface PageProps {
|
||||
}>
|
||||
}
|
||||
|
||||
export async function generateMetadata(
|
||||
{ params }: PageProps
|
||||
): Promise<Metadata> {
|
||||
const { id } = await params
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
await queryClient.prefetchQuery(blogSingleQueryOptions(id))
|
||||
const blog = queryClient.getQueryData(blogSingleQueryOptions(id).queryKey) as BlogSingleResponse
|
||||
|
||||
return {
|
||||
title: 'مجله داناک' + ' | ' + blog.data.blog.metaTitle,
|
||||
description: blog.data.blog.metaDescription,
|
||||
}
|
||||
}
|
||||
|
||||
const SingleBlog: NextPage<PageProps> = async ({ params }) => {
|
||||
|
||||
const { id } = await params
|
||||
|
||||
@@ -11,7 +11,7 @@ const ContactUs: FC = () => {
|
||||
<div className='flex gap-4 mt-6'>
|
||||
<div className='flex-1 bg-[#0A66C2] text-white rounded-xl p-4'>
|
||||
<Image
|
||||
src='/images/linkedin2.svg'
|
||||
src='/images/linkedin3.svg'
|
||||
alt='contact us'
|
||||
width={25}
|
||||
height={25}
|
||||
|
||||
@@ -6,8 +6,16 @@ import Loading from './loading'
|
||||
import { blogCategoriesQueryOptions, blogsQueryOptions, blogCombinedQueryOptions, mostVisitedBlogsQueryOptions } from './hooks/useBlogsData'
|
||||
|
||||
export const metadata = {
|
||||
title: 'مجله داناک | مقالات و آموزشها',
|
||||
title: 'مجله داناک | مدیریت ، فناوری ، طراحی',
|
||||
description: 'مقالات جذاب، نکات آموزشی و اخبار دنیای نرمافزار در مجله داناک',
|
||||
openGraph: {
|
||||
title: 'مجله داناک | مدیریت ، فناوری ، طراحی',
|
||||
description: 'مقالات جذاب، نکات آموزشی و اخبار دنیای نرمافزار در مجله داناک',
|
||||
url: 'https://danakcorp.com/blogs',
|
||||
siteName: 'داناک',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
}
|
||||
|
||||
export default function BlogsPage() {
|
||||
|
||||
@@ -3,6 +3,19 @@ import { Suspense } from 'react'
|
||||
import Loading from './loading'
|
||||
import DanakServicesContent from './DanakServicesContent'
|
||||
|
||||
export const metadata = {
|
||||
title: 'داناک | خدمات',
|
||||
description: 'خدمات ما',
|
||||
openGraph: {
|
||||
title: 'داناک | خدمات',
|
||||
description: 'خدمات ما',
|
||||
url: 'https://danakcorp.com/danak-services',
|
||||
siteName: 'داناک',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
}
|
||||
|
||||
const DanakServices: NextPage = () => {
|
||||
return (
|
||||
<Suspense fallback={<Loading />}>
|
||||
|
||||
@@ -7,6 +7,20 @@ import { landingQueryOptions } from './home/hooks/useHomeData'
|
||||
import LangingPage from './home/LangingPage'
|
||||
import Loading from './loading'
|
||||
|
||||
export const metadata = {
|
||||
title: 'شرکت نرم افزاری داناک',
|
||||
description: 'ارائه راهکارهای مبتنی بر تکنولوژی نوآورانه برای بهبود کسبوکار، افزایش بهرهوری و رشد پایدار',
|
||||
openGraph: {
|
||||
title: 'شرکت نرم افزاری داناک',
|
||||
description: 'ارائه راهکارهای مبتنی بر تکنولوژی نوآورانه برای بهبود کسبوکار، افزایش بهرهوری و رشد پایدار',
|
||||
url: 'https://danakcorp.com/',
|
||||
siteName: 'شرکت نرم افزاری داناک',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
<Suspense fallback={<Loading />}>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Suspense } from 'react'
|
||||
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'
|
||||
import { detailServiceQueryOptions } from '../hooks/useProductData'
|
||||
import { NextPage } from 'next'
|
||||
import { Metadata, NextPage } from 'next'
|
||||
import DetailService from '../DetailService'
|
||||
import Loading from './loading'
|
||||
import { ServiceDetailResponse } from '../types/ProductTypes'
|
||||
|
||||
interface PageProps {
|
||||
params: Promise<{
|
||||
@@ -11,6 +12,22 @@ interface PageProps {
|
||||
}>
|
||||
}
|
||||
|
||||
|
||||
export async function generateMetadata(
|
||||
{ params }: PageProps
|
||||
): Promise<Metadata> {
|
||||
const { id } = await params
|
||||
const queryClient = new QueryClient()
|
||||
|
||||
await queryClient.prefetchQuery(detailServiceQueryOptions(id))
|
||||
const service = queryClient.getQueryData(detailServiceQueryOptions(id).queryKey) as ServiceDetailResponse
|
||||
|
||||
return {
|
||||
title: 'مجله داناک' + ' | ' + service.data.danakService.name,
|
||||
description: service.data.danakService.metaDescription,
|
||||
}
|
||||
}
|
||||
|
||||
const SingleService: NextPage<PageProps> = async ({ params }) => {
|
||||
|
||||
const { id } = await params
|
||||
|
||||
@@ -77,7 +77,7 @@ const ServiceHeader: FC<Props> = (props: Props) => {
|
||||
<div className='text-xs whitespace-nowrap flex gap-1 items-center'>
|
||||
<div className='flex gap-2'>
|
||||
{
|
||||
finalPrice !== price &&
|
||||
finalPrice !== price && !!price &&
|
||||
<div className='line-through text-xs text-description'>
|
||||
{NumberFormat(Number(price))}
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,20 @@ import { categoriesQueryOptions, danakServiceSuggestedQueryOptions, servicesQuer
|
||||
import Products from './ProductsPage'
|
||||
import Loading from './loading'
|
||||
|
||||
export const metadata = {
|
||||
title: 'داناک | محصولات',
|
||||
description: 'محصولات و خدمات ما',
|
||||
openGraph: {
|
||||
title: 'داناک | محصولات',
|
||||
description: 'محصولات و خدمات ما',
|
||||
url: 'https://danakcorp.com/products',
|
||||
siteName: 'داناک',
|
||||
locale: 'fa_IR',
|
||||
type: 'website',
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
const ProductsPage: NextPage = () => {
|
||||
return (
|
||||
<Suspense fallback={<Loading />}>
|
||||
|
||||
Reference in New Issue
Block a user