Skip to content

Commit 4258232

Browse files
committed
remove published and share button
1 parent a773521 commit 4258232

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

platforms/web/src/Teach.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { Footer } from './Footer';
99
function Teach() {
1010
const navigate = useNavigate();
1111
const [allMaps, setAllMaps] = useState<TeacherMapEntry[]>([]);
12-
const [copiedId, setCopiedId] = useState<string | null>(null);
1312
const [newMapUrl, setNewMapUrl] = useState('');
1413
const [loading, setLoading] = useState(false);
1514
const [error, setError] = useState<string | null>(null);
@@ -34,18 +33,6 @@ function Teach() {
3433
}
3534
};
3635

37-
const handleCopyShareLink = async (map: TeacherMapEntry) => {
38-
const shareUrl = map.jsonId
39-
? `${window.location.origin}/learn#json=${map.jsonId}`
40-
: null;
41-
42-
if (shareUrl) {
43-
await navigator.clipboard.writeText(shareUrl);
44-
setCopiedId(map.id);
45-
setTimeout(() => setCopiedId(null), 2000);
46-
}
47-
};
48-
4936
const handleEditMap = (map: TeacherMapEntry) => {
5037
// Use jsonId if published, otherwise use the local storage ID
5138
const editId = map.jsonId || map.id;
@@ -360,11 +347,6 @@ function Teach() {
360347
<span>Created: {new Date(map.createdAt).toLocaleDateString()}</span>
361348
<span>Modified: {new Date(map.lastModified).toLocaleDateString()}</span>
362349
</div>
363-
{map.jsonId && (
364-
<div className="share-section">
365-
<span className="published-badge">✓ Published</span>
366-
</div>
367-
)}
368350
</div>
369351
<div className="map-card-footer">
370352
<button
@@ -373,14 +355,6 @@ function Teach() {
373355
>
374356
Edit
375357
</button>
376-
{map.jsonId && (
377-
<button
378-
onClick={() => handleCopyShareLink(map)}
379-
className="action-button primary-button"
380-
>
381-
{copiedId === map.id ? '✓ Copied!' : 'Copy Share Link'}
382-
</button>
383-
)}
384358
</div>
385359
</div>
386360
))}

0 commit comments

Comments
 (0)