( ctx: GetServerSidePropsContext, )
| 280 | |
| 281 | export const getServerSideProps = getAnalyticsServerSideProps; |
| 282 | export async function getAnalyticsServerSideProps( |
| 283 | ctx: GetServerSidePropsContext, |
| 284 | ) { |
| 285 | const signInProps = await pageGetServerSideProps(ctx); |
| 286 | if (signInProps.redirect) return signInProps; |
| 287 | |
| 288 | const supabase = createServerSupabaseClient(ctx); |
| 289 | const onChange = () => {}; |
| 290 | const checked = true; |
| 291 | const conversations = await getConversations( |
| 292 | 0, |
| 293 | PAGESIZE, |
| 294 | // TODO: Grab from URL if set |
| 295 | [ |
| 296 | { id: "1", name: "No Feedback", checked, onChange }, |
| 297 | { id: "2", name: "Positive Feedback", checked, onChange }, |
| 298 | { id: "3", name: "Negative Feedback", checked, onChange }, |
| 299 | ], |
| 300 | [ |
| 301 | { id: "1", name: "From Playground", checked, onChange }, |
| 302 | { id: "2", name: "From API", checked, onChange }, |
| 303 | ], |
| 304 | supabase, |
| 305 | ); |
| 306 | return { |
| 307 | props: { |
| 308 | ...signInProps.props, |
| 309 | conversations, |
| 310 | conversationId: ctx.query.id ?? null, |
| 311 | }, |
| 312 | }; |
| 313 | } |
nothing calls this directly
no test coverage detected