MCPcopy
hub / github.com/github/docs / getServerSideProps

Function getServerSideProps

pages/index.tsx:75–93  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

73}
74
75export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
76 const req = context.req as any
77 const res = context.res as any
78
79 return {
80 props: {
81 mainContext: await getMainContext(req, res),
82 productGroups: req.context.productGroups,
83 gettingStartedLinks: req.context.featuredLinks.gettingStarted.map(
84 ({ title, href, intro }: any) => ({ title, href, intro })
85 ),
86 popularLinks: req.context.featuredLinks.popular.map(({ title, href, intro }: any) => ({
87 title,
88 href,
89 intro,
90 })),
91 },
92 }
93}

Callers

nothing calls this directly

Calls 1

getMainContextFunction · 0.90

Tested by

no test coverage detected