regirstation works but shared links broken
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user