weareinreach / InReach

async function should have await expression JS-0116
Bug risk
Minor
2 occurrences in this check
Found async function without any await expressions
156	)
157}
158
159export const getStaticPaths: GetStaticPaths = async () => {160	// eslint-disable-next-line node/no-process-env, turbo/no-undeclared-env-vars161	// if (getEnv('VERCEL_ENV') === 'production' || process.env.PRERENDER === 'true') {162	// 	const pages = await prisma.organization.findMany({163	// 		where: { published: true, deleted: false },164	// 		select: { slug: true },165	// 	})166	// 	return {167	// 		paths: pages.map(({ slug }) => ({ params: { slug } })),168	// 		// fallback: 'blocking', // false or "blocking"169	// 		fallback: true,170	// 	}171	// } else {172	return {173		paths: [],174		// fallback: 'blocking',175		fallback: true,176	}177	// }178}179
180export const getStaticProps: GetStaticProps<Record<string, unknown>, RoutedQuery<'/org/[slug]'>> = async ({
181	locale,
Found async function without any await expressions
127	)
128}
129
130export const getStaticPaths: GetStaticPaths = async () => {131	// eslint-disable-next-line node/no-process-env, turbo/no-undeclared-env-vars132	// if (getEnv('VERCEL_ENV') === 'production' || process.env.PRERENDER === 'true') {133	// 	const pages = await prisma.organization.findMany({134	// 		where: { published: true, deleted: false },135	// 		select: { slug: true, locations: { select: { id: true }, where: { published: true, deleted: false } } },136	// 	})137138	// 	return {139	// 		paths: compact(140	// 			pages.flatMap(({ slug, locations }) => {141	// 				if (locations.length > 1) {142	// 					return locations.map((location) => ({ params: { slug: slug, orgLocationId: location.id } }))143	// 				}144	// 			})145	// 		),146	// 		// fallback: 'blocking', // false or "blocking"147	// 		fallback: true,148	// 	}149	// } else {150	return {151		paths: [],152		// fallback: 'blocking',153		fallback: true,154	}155	// }156}157export const getStaticProps: GetStaticProps = async ({ locale, params }) => {
158	const urlParams = z.object({ slug: z.string(), orgLocationId: z.string() }).safeParse(params)
159	if (!urlParams.success) return { notFound: true }