fix: wrap child components in a memo
This commit is contained in:
parent
d5f245e2c1
commit
14c725ccd9
|
@ -5,15 +5,20 @@ import {
|
||||||
} from "@/components/Browser.tsx";
|
} from "@/components/Browser.tsx";
|
||||||
import Lume from "@/components/Lume.tsx";
|
import Lume from "@/components/Lume.tsx";
|
||||||
import { LumeProvider } from "@lumeweb/sdk";
|
import { LumeProvider } from "@lumeweb/sdk";
|
||||||
|
import { memo } from "react";
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
|
const MemeoedNavigator = memo(Navigator);
|
||||||
|
const MemeoedLume = memo(Lume);
|
||||||
|
const MemeoedBrowser = memo(Browser);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LumeProvider>
|
<LumeProvider>
|
||||||
<BrowserStateProvider>
|
<BrowserStateProvider>
|
||||||
<>
|
<>
|
||||||
<header className="relative h-14 px-2 pl-2 py-2 w-full bg-neutral-900 flex">
|
<header className="relative h-14 px-2 pl-2 py-2 w-full bg-neutral-900 flex">
|
||||||
<div className="relative h-full w-full rounded-full bg-neutral-800 border border-neutral-700 flex items-center [>input:focus]:ring-2 [>input:focus]:ring-white">
|
<div className="relative h-full w-full rounded-full bg-neutral-800 border border-neutral-700 flex items-center [>input:focus]:ring-2 [>input:focus]:ring-white">
|
||||||
<Navigator />
|
<MemeoedNavigator />
|
||||||
</div>
|
</div>
|
||||||
<div className="w-32 flex justify-end">
|
<div className="w-32 flex justify-end">
|
||||||
<Lume />
|
<Lume />
|
||||||
|
|
Loading…
Reference in New Issue