feat: render portfolio routes from live localized database content
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
import { useCallback, useEffect, useRef, type PointerEvent, type ReactNode } from 'react';
|
||||
import { X } from 'lucide-react';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { messagesByLocale, type Locale } from '@/i18n/content';
|
||||
import type { PublicPortfolio } from '@/server/content';
|
||||
import { useDismissCaseStudy } from './PortfolioRouteShell';
|
||||
import { CaseStudyShare } from './CaseStudyShare';
|
||||
import { useDrawerDrag } from './useDrawerDrag';
|
||||
import styles from './CaseStudyDrawer.module.css';
|
||||
|
||||
export function CaseStudyDrawer({ children, locale }: { children: ReactNode; locale: Locale }) {
|
||||
const copy = messagesByLocale[locale].projects;
|
||||
export function CaseStudyDrawer({ children, portfolio }: { children: ReactNode; portfolio: PublicPortfolio }) {
|
||||
const copy = portfolio.messages.projects;
|
||||
const pathname = usePathname();
|
||||
const dismissRoute = useDismissCaseStudy();
|
||||
const dialogRef = useRef<HTMLDialogElement>(null);
|
||||
@@ -127,7 +127,7 @@ export function CaseStudyDrawer({ children, locale }: { children: ReactNode; loc
|
||||
</div>
|
||||
<span className={styles.drawerLabel}>{copy.drawerLabel}</span>
|
||||
<div className={styles.actions}>
|
||||
<CaseStudyShare locale={locale} />
|
||||
<CaseStudyShare portfolio={portfolio} />
|
||||
<button
|
||||
type="button"
|
||||
className={styles.iconButton}
|
||||
|
||||
Reference in New Issue
Block a user