regirstation works but shared links broken

This commit is contained in:
2025-12-12 20:38:35 +05:00
parent 4d3085623a
commit 1f088c8fb0
23 changed files with 1739 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import { CABLE_COLORS, CABLE_LABELS } from '../../types/mapItem';
interface ToolbarProps {
mapId: string;
onShare: () => void;
}
interface ToolButton {
@@ -69,11 +70,23 @@ const TOOLS: ToolButton[] = [
},
];
export function Toolbar({ mapId }: ToolbarProps) {
export function Toolbar({ mapId, onShare }: ToolbarProps) {
const { activeTool, setActiveTool } = useDrawingStore();
return (
<div className="bg-white shadow-lg rounded-lg p-2 space-y-1" style={{ minWidth: '150px' }}>
{/* Share button */}
<button
onClick={onShare}
className="w-full px-3 py-2 rounded text-left flex items-center gap-2 transition-colors bg-green-100 text-green-700 hover:bg-green-200 font-medium mb-2"
title="Share this map"
>
<span className="text-lg">🔗</span>
<span className="text-sm">Share</span>
</button>
<div className="border-t border-gray-200 my-2"></div>
{TOOLS.map((tool) => (
<button
key={tool.id}