Skip to content

Commit

Permalink
chore(docs): simplify intro example
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Sep 3, 2024
1 parent 8a7a7ef commit 74568a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions packages/docs/src/components/intro-example/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ export function AdvancedFilter() {
const { context, predicate } = useFilterSphere({ schema });
return (
<>
<div className="not-content" style={{ marginTop: "1rem" }}>
{/* 3. display the FilterBuilder inside the FilterSphereProvider */}
<FilterSphereProvider context={context}>
<FilterBuilder />
</FilterSphereProvider>
</div>
{/* 3. display the FilterBuilder inside the FilterSphereProvider */}
<FilterSphereProvider context={context}>
<FilterBuilder />
</FilterSphereProvider>
{/* 4. use the predicate to filter the data */}
<Table data={data.filter(predicate)} />
</>
Expand Down
4 changes: 3 additions & 1 deletion packages/docs/src/content/docs/guides/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import importedCode from "~/components/intro-example/code?raw";

<Tabs>
<TabItem label="Preview">
<AdvancedFilter client:load />
<div className="not-content" style={{ marginTop: "1rem" }}>
<AdvancedFilter client:load />
</div>
</TabItem>
<TabItem label="Code">
<Code code={importedCode} lang="tsx" />
Expand Down

0 comments on commit 74568a7

Please sign in to comment.