This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getServerSideProps: GetServerSideProps = async () => { | |
// get a list of all dogs randomly sorted and limited to 2 | |
const data = [...dogs].sort(() => Math.random() - 0.5).slice(0, 2); | |
return { props: { data } }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment