Skip to content

Instantly share code, notes, and snippets.

@bajcmartinez
Last active May 2, 2024 20:35
Show Gist options
  • Save bajcmartinez/7082afea030f7cca207e01ffa45dec19 to your computer and use it in GitHub Desktop.
Save bajcmartinez/7082afea030f7cca207e01ffa45dec19 to your computer and use it in GitHub Desktop.
// Return a list of `params` to populate the [slug] dynamic segment
export async function generateStaticParams() {
return ['team1', 'team2'].map((team) => ({
teamId: team,
}))
}
type Props = {
params: {
teamId: string
}
}
export default async function TeamsPage({ params: { teamId } } : Props) {
const players = await fetch('api.....');
return (
<>Your Code</>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment