Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jul 2, 2023
1 parent 919433e commit 829e280
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions custom-src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default component$(() => {
<>
<h1>Homepage</h1>
<p>{rootData.value.serverTime}</p>
<p>Origin: {rootData.value.origin}</p>
<div class="black-box">
this should be black
</div>
Expand Down
3 changes: 2 additions & 1 deletion custom-src/routes/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import { routeLoader$ } from "@builder.io/qwik-city";
import { Footer } from "../components/footer/footer";
import { isUserAuthenticated } from "../auth/auth";

export const useRootLoader = routeLoader$(() => {
export const useRootLoader = routeLoader$(({url}) => {
return {
serverTime: new Date().toISOString(),
origin: url.origin,
};
});

Expand Down

0 comments on commit 829e280

Please sign in to comment.