Skip to content

Commit

Permalink
chore: remove TopBar
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Dec 20, 2024
1 parent 50d4cc1 commit d7492df
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions docs/site/src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@ import * as CONFIG from '../config';
const { content = {} } = Astro.props;
const currentPage = new URL(Astro.request.url).pathname;
const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}${currentPage === '/' ? '/index' : currentPage}.md`;
const apiKey = `YJIGb4i01jvw0SRdL5Bt`; // ggignore
const handleError = (err: any) => {
console.log(err);
// The requested Builder content could not be found.
if (err.response.status === 404) {
return { data: null };
}
throw err;
};
const topBarUrl = new URL('https://cdn.builder.io/api/v1/qwik/oss-top-bar');
topBarUrl.searchParams.set('apiKey', apiKey);
topBarUrl.searchParams.set('userAttributes.site', 'partytown.qwik.dev');
topBarUrl.searchParams.set('userAttributes.url', new URL(Astro.request.url).pathname);
topBarUrl.searchParams.set('cachebust', 'true');
const topBarData = await fetch(topBarUrl.toString())
.then((res) => res.json())
.catch(handleError);
---

<html dir={content.dir ?? 'ltr'} lang={content.lang ?? 'en-us'} class="initial">
Expand Down Expand Up @@ -130,7 +110,6 @@ const topBarData = await fetch(topBarUrl.toString())
</head>

<body>
<div set:html={topBarData.html}></div>
<Header {currentPage} />
<main class="layout">
<aside id="grid-left" class="grid-sidebar" title="Site Navigation">
Expand Down

0 comments on commit d7492df

Please sign in to comment.