Skip to content

Commit

Permalink
chore(docs): remove warnings (#5345)
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa authored Oct 22, 2023
1 parent 374f25e commit a29ea2e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
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

0 comments on commit a29ea2e

Please sign in to comment.