refactor: change routing to astro
This commit is contained in:
39
src/pages/[slug].astro
Normal file
39
src/pages/[slug].astro
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro'
|
||||
import '../styles/globals.css'
|
||||
import { Header } from '../components/Header'
|
||||
import { Footer } from '../components/Footer'
|
||||
import { CategoryRoute } from '../views/CategoryRoute'
|
||||
|
||||
export function getStaticPaths() {
|
||||
return [
|
||||
{ params: { slug: 'cloud' } },
|
||||
{ params: { slug: 'russian-software' } },
|
||||
{ params: { slug: 'cybersecurity' } },
|
||||
{ params: { slug: 'ai-solutions' } },
|
||||
{ params: { slug: 'russian-hardware' } },
|
||||
{ params: { slug: 'hardware-solutions' } },
|
||||
{ params: { slug: 'cad-gis' } },
|
||||
{ params: { slug: 'industrial-solutions' } },
|
||||
{ params: { slug: 'government' } },
|
||||
{ params: { slug: 'business' } },
|
||||
{ params: { slug: 'consulting' } },
|
||||
{ params: { slug: 'implementation' } },
|
||||
{ params: { slug: 'managed-services' } },
|
||||
{ params: { slug: 'integration' } },
|
||||
{ params: { slug: 'specialized-services' } },
|
||||
{ params: { slug: 'support' } },
|
||||
{ params: { slug: 'subscription' } },
|
||||
]
|
||||
}
|
||||
|
||||
const slug = Astro.params.slug!
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<div class="min-h-screen bg-white w-full overflow-x-hidden">
|
||||
<Header client:load />
|
||||
<CategoryRoute client:load slug={slug} />
|
||||
<Footer client:load />
|
||||
</div>
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user