fix: wrap child components in a memo

This commit is contained in:
Derrick Hammer 2023-10-16 12:43:31 -04:00
parent d5f245e2c1
commit 14c725ccd9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -5,15 +5,20 @@ import {
} from "@/components/Browser.tsx";
import Lume from "@/components/Lume.tsx";
import { LumeProvider } from "@lumeweb/sdk";
import { memo } from "react";
export default function () {
const MemeoedNavigator = memo(Navigator);
const MemeoedLume = memo(Lume);
const MemeoedBrowser = memo(Browser);
return (
<LumeProvider>
<BrowserStateProvider>
<>
<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">
<Navigator />
<MemeoedNavigator />
</div>
<div className="w-32 flex justify-end">
<Lume />