}
-const PlanetNavigation = async ({ category, prevId, nextId }: Props) => {
- const t = await getTranslations('planetDetails');
-
+const PlanetNavigation = ({ category, prevId, nextId, labels }: Props) => {
return (
{prevId ? (
@@ -19,11 +16,11 @@ const PlanetNavigation = async ({ category, prevId, nextId }: Props) => {
href={`/roadmap/${category}/${prevId}`}
className="bg-green-600 text-white px-5 py-2 rounded font-semibold hover:bg-green-700 transition-colors"
>
- ❮ {t('previous')}
+ ❮ {labels.previous}
) : (
- ❮ {t('previous')}
+ ❮ {labels.previous}
)}
@@ -32,11 +29,11 @@ const PlanetNavigation = async ({ category, prevId, nextId }: Props) => {
href={`/roadmap/${category}/${nextId}`}
className="bg-green-600 text-white px-5 py-2 rounded font-semibold hover:bg-green-700 transition-colors"
>
- {t('next')} ❯
+ {labels.next} ❯
) : (
- {t('next')} ❯
+ {labels.next} ❯
)}
diff --git a/src/components/shared/planet-details/contents/Questions.tsx b/src/components/shared/planet-details/Questions.tsx
similarity index 70%
rename from src/components/shared/planet-details/contents/Questions.tsx
rename to src/components/shared/planet-details/Questions.tsx
index 64ad9e9..4d4b197 100644
--- a/src/components/shared/planet-details/contents/Questions.tsx
+++ b/src/components/shared/planet-details/Questions.tsx
@@ -1,17 +1,14 @@
-import { getTranslations } from 'next-intl/server';
-
import type { Question } from '@/types/planet';
interface Props {
questions: Question[];
+ labels: Record
}
-const Questions = async ({ questions }: Props) => {
- const t = await getTranslations('planetDetails');
-
+const Questions = ({ questions, labels }: Props) => {
return (
- {t('questions')}
+ {labels.questions}
{questions.map((qn, idx) => (
-
diff --git a/src/components/shared/planet-details/ResearchTopics.tsx b/src/components/shared/planet-details/ResearchTopics.tsx
index ce475fb..d68c54f 100644
--- a/src/components/shared/planet-details/ResearchTopics.tsx
+++ b/src/components/shared/planet-details/ResearchTopics.tsx
@@ -1,16 +1,14 @@
-import { getTranslations } from 'next-intl/server';
-
import type { ResearchTopic } from '@/types/planet';
interface Props {
researchTopics: ResearchTopic[];
+ labels: Record
}
-const ResearchTopics = async ({ researchTopics }: Props) => {
- const t = await getTranslations('planetDetails');
+const ResearchTopics = ({ researchTopics, labels }: Props) => {
return (
-
{t('researchTopics')}
+ {labels.researchTopics}
{researchTopics.map((topic) => (
- {topic.topic}
diff --git a/src/components/shared/planet-details/Resources.tsx b/src/components/shared/planet-details/Resources.tsx
index 48bf2bd..e2df10a 100644
--- a/src/components/shared/planet-details/Resources.tsx
+++ b/src/components/shared/planet-details/Resources.tsx
@@ -1,19 +1,17 @@
import { ExternalLink } from 'lucide-react';
import Link from 'next/link';
-import { getTranslations } from 'next-intl/server';
import type { Resource } from '@/types/planet';
interface Props {
resources: Resource[];
+ labels: Record
}
-const Resources = async ({ resources }: Props) => {
- const t = await getTranslations('planetDetails');
-
+const Resources = ({ resources, labels }: Props) => {
return (
- {t('resources')}
+ {labels.resources}
{resources.map((res) => (
-
diff --git a/src/lib/constants/navbarItems.ts b/src/lib/constants/navbarItems.ts
index fea6f57..7e722c1 100644
--- a/src/lib/constants/navbarItems.ts
+++ b/src/lib/constants/navbarItems.ts
@@ -37,7 +37,7 @@ export const navLinks: NavLinkGroup[] = [
label: 'HTML',
icon: html,
path: '/roadmap/html',
- isActive: false,
+ isActive: true,
},
{
label: 'CSS',
@@ -49,7 +49,7 @@ export const navLinks: NavLinkGroup[] = [
label: 'JavaScript',
icon: js,
path: '/roadmap/javascript',
- isActive: true,
+ isActive: false,
},
{
label: 'React',
diff --git a/src/lib/constants/planet.ts b/src/lib/constants/planet.ts
index 9bde6e5..15cf0a4 100644
--- a/src/lib/constants/planet.ts
+++ b/src/lib/constants/planet.ts
@@ -4,8 +4,6 @@ export const PLANET_STATUS = ['draft', 'published'] as const;
export const PLANET_CATEGORY = {
common: 'Common',
html: 'HTML',
- css: 'CSS',
- javascript: 'Javascript',
} as const;
export const CONTENT_TYPE = {