'use client' import React from 'react' import Head from 'next/head' import { getCookie } from 'cookies-next' import { useTranslations } from 'next-intl' import api from '~utils/api' import generateTitle from '~utils/generateTitle' interface Props { party: Party meta: { [key: string]: string } } const PartyHead = ({ party, meta }: Props) => { // Import translations const t = useTranslations('common') // Get locale from cookie const cookieLocale = getCookie('NEXT_LOCALE') as string const locale = cookieLocale && ['en', 'ja'].includes(cookieLocale) ? cookieLocale : 'en' const previewUrl = `${ process.env.NEXT_PUBLIC_SITE_URL || 'https://granblue.team' }/p/${party.shortcode}/preview` return ( {/* HTML */} {generateTitle(meta.element, party.user?.username, party.name)} {/* OpenGraph */} {/* Twitter */} ) } export default PartyHead