Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): remove warnings #5345

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/docs/src/components/code-sandbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default component$<{
<div class="tabs">
{tabs.map((tab, idx) => (
<span
key={idx}
onClick$={() => (activeTab.value = idx)}
class={{ tab: true, active: idx == activeTab.value }}
>
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/docsearch/doc-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const DocSearch = component$((props: DocSearchProps) => {
snippetLength: 10,
});

const searchButtonRef = useSignal();
const searchButtonRef = useSignal<Element>();

return (
<div
Expand Down
10 changes: 8 additions & 2 deletions packages/docs/src/components/docsearch/search-box.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import { component$, useVisibleTask$, useContext, type Signal } from '@builder.io/qwik';
import {
component$,
useVisibleTask$,
useContext,
type Signal,
type PropFunction,
} from '@builder.io/qwik';

import { MAX_QUERY_SIZE } from './constants';
import { SearchContext } from './context';
Expand All @@ -17,7 +23,7 @@ interface SearchBoxProps {
state: DocSearchState;
autoFocus: boolean;
inputRef: Signal<HTMLInputElement | null>;
onClose$: () => void;
onClose$: PropFunction<() => void>;
}

export const SearchBox = component$((props: SearchBoxProps) => {
Expand Down
12 changes: 6 additions & 6 deletions packages/docs/src/components/router-head/router-head.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ export const RouterHead = component$(() => {
</>
)}

{head.meta.map((m) => (
<meta {...m} />
{head.meta.map((m, key) => (
<meta key={key} {...m} />
))}

{head.links.map((l) => (
<link {...l} />
{head.links.map((l, key) => (
<link key={key} {...l} />
))}

{head.styles.map((s) => (
<style {...s.props} dangerouslySetInnerHTML={s.style} />
{head.styles.map((s, key) => (
<style key={key} {...s.props} dangerouslySetInnerHTML={s.style} />
))}

<ThemeScript />
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function Items({
<ul>
{items &&
items.map((item, i) => (
<li>
<li key={i}>
{item.items ? (
<details
open={allOpen || i < 1 || item.items?.some((item) => pathname === item.href)}
Expand Down
4 changes: 2 additions & 2 deletions packages/docs/src/routes/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export default component$(() => {
</button>
{breadcrumbs.length > 0 ? (
<ol>
{breadcrumbs.map((b) => (
<li>{b.text}</li>
{breadcrumbs.map((b, key) => (
<li key={key}>{b.text}</li>
))}
</ol>
) : null}
Expand Down