Open History to see the last commit
1import { component$, Slot } from "@builder.io/qwik";
2import type { RequestHandler } from "@builder.io/qwik-city";
3<% if (addOns.length) { %>
4import Header from '../components/header'
5<% } %>
6
7export const onGet: RequestHandler = async ({ cacheControl }) => {
8 // Control caching for this request for best performance and to reduce hosting costs:
9 // https://qwik.dev/docs/caching/
10 cacheControl({
11 // Always serve a cached response by default, up to a week stale
12 staleWhileRevalidate: 60 * 60 * 24 * 7,
13 // Max once every 5 seconds, revalidate on the server to get a fresh version of this page
14 maxAge: 5,
15 });
16};
17
18export default component$(() => {
19 return (
20 <>
21 <% if (addOns.length > 0 || integrations.length > 0 || routes.length > 0) { %>
22 <Header />
23 <% } %>
24 <Slot />
25 </>
26 )
27});