export const getStaticPaths = async () => { const data = await(await fetch()).json() const allUserIds = data.users.map((user) => user.id)
return {
paths: allUserIds.map((userId) => ({ params: {id : `${userId}`}})),
fallback: false,
}
}
export const getStaticProps = async (context) => { const id = context.params.id const data - await(await fetch()).json() return { props: { data, } } }
export const getQuotes = async () => { return await (await fetch("", {cache: "force-cache"})).json() }
export page = async () => { const quotes = await getQuotes() return (
{quotes.map((quote, index) => {
return <Link href={
pathname: "/blog",
query: {quote: quote}
}>
})}
)
}
export page = async ({ searchParams }) => { kf return (
{searchParams.quote}
)
}
useSWR()
image -> layout == responsive