perf(canvas): shrink Toolbar logo 1.3 MB to 2.2 KB + next/image #1331

Closed
core-fe wants to merge 4 commits from perf/canvas-toolbar-logo-shrink into staging
2 changed files with 9 additions and 1 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 2.2 KiB

+9 -1
View File
@@ -1,6 +1,7 @@
"use client";
import { useMemo, useState, useCallback, useEffect, useRef } from "react";
import Image from "next/image";
import { api } from "@/lib/api";
import { useCanvasStore } from "@/store/canvas";
import { SettingsButton } from "@/components/settings/SettingsButton";
@@ -159,7 +160,14 @@ export function Toolbar() {
>
{/* Logo / Title — title text drops on mobile to reclaim space */}
<div className="flex items-center gap-2 sm:pr-3 sm:border-r sm:border-line/60">
<img src="/molecule-icon.png" alt="Molecule AI" className="w-5 h-5" />
<Image
src="/molecule-icon.png"
alt="Molecule AI"
width={20}
height={20}
className="w-5 h-5"
priority
/>
<span className="hidden sm:inline text-[11px] font-semibold text-ink-mid tracking-wide">Molecule AI</span>
</div>