Switch from TTF to WOFF to fix OG image size issue
This commit is contained in:
parent
51e3f5acc1
commit
2c7dc8e5f9
6 changed files with 5 additions and 5 deletions
|
|
@ -14,11 +14,11 @@ export const size = {
|
||||||
export const contentType = 'image/png'
|
export const contentType = 'image/png'
|
||||||
|
|
||||||
const interRegular = fetch(
|
const interRegular = fetch(
|
||||||
new URL('../../../assets/fonts/Inter-Regular.ttf', import.meta.url)
|
new URL('../../../assets/fonts/Inter-Regular.woff', import.meta.url)
|
||||||
).then(res => res.arrayBuffer())
|
).then(res => res.arrayBuffer())
|
||||||
|
|
||||||
const interBold = fetch(
|
const interBold = fetch(
|
||||||
new URL('../../../assets/fonts/Inter-Bold.ttf', import.meta.url)
|
new URL('../../../assets/fonts/Inter-Bold.woff', import.meta.url)
|
||||||
).then(res => res.arrayBuffer())
|
).then(res => res.arrayBuffer())
|
||||||
|
|
||||||
interface ImageProps {
|
interface ImageProps {
|
||||||
|
|
@ -93,7 +93,9 @@ export default async function Image({ params }: ImageProps) {
|
||||||
<div tw="flex text-[#eaeaf0] ml-2">KV</div>
|
<div tw="flex text-[#eaeaf0] ml-2">KV</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div tw="text-[1.8rem] ml-auto text-[#9b9ba4]">demo.chat.vercel.ai</div>
|
<div tw="text-[1.8rem] ml-auto text-[#9b9ba4]">
|
||||||
|
demo.chat.vercel.ai
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
assets/fonts/Inter-Bold.woff
Normal file
BIN
assets/fonts/Inter-Bold.woff
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/fonts/Inter-Regular.woff
Normal file
BIN
assets/fonts/Inter-Regular.woff
Normal file
Binary file not shown.
|
|
@ -19,7 +19,6 @@ import {
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Button } from './ui/button'
|
import { Button } from './ui/button'
|
||||||
import { Input } from './ui/input'
|
import { Input } from './ui/input'
|
||||||
import { useRouter } from 'next/navigation'
|
|
||||||
|
|
||||||
const IS_PREVIEW = process.env.VERCEL_ENV === 'preview'
|
const IS_PREVIEW = process.env.VERCEL_ENV === 'preview'
|
||||||
export interface ChatProps extends React.ComponentProps<'div'> {
|
export interface ChatProps extends React.ComponentProps<'div'> {
|
||||||
|
|
@ -28,7 +27,6 @@ export interface ChatProps extends React.ComponentProps<'div'> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Chat({ id, initialMessages, className }: ChatProps) {
|
export function Chat({ id, initialMessages, className }: ChatProps) {
|
||||||
const router = useRouter()
|
|
||||||
const [previewToken, setPreviewToken] = useLocalStorage<string | null>(
|
const [previewToken, setPreviewToken] = useLocalStorage<string | null>(
|
||||||
'ai-token',
|
'ai-token',
|
||||||
null
|
null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue