···11// src/components/Shortcut/Shortcut.jsx
22-import React, { useState, useRef } from 'react';
33-import ImageGallery from 'react-image-gallery';
44-import 'react-image-gallery/styles/css/image-gallery.css';
22+import React from 'react';
53import './Shortcut.css';
6475const Shortcut = () => {
88- const [isOpen, setIsOpen] = useState(false);
99- const [currentIndex, setCurrentIndex] = useState(0);
1010- const galleryRef = useRef(null);
1111-1212- const images = [
1313- {
1414- original: '/how-to-use-cred-blue-shortcut.png',
1515- thumbnail: '/how-to-use-cred-blue-shortcut.png',
1616- },
1717- {
1818- original: '/enable-share-sheet.png',
1919- thumbnail: '/enable-share-sheet.png',
2020- },
2121- ];
2222-2323- const openLightbox = (index) => {
2424- setCurrentIndex(index);
2525- setIsOpen(true);
2626- };
2727-2828- const closeLightbox = () => {
2929- setCurrentIndex(0);
3030- setIsOpen(false);
3131- };
3232-3333- const handleClickOutside = (event) => {
3434- if (galleryRef.current && !galleryRef.current.contains(event.target)) {
3535- closeLightbox();
3636- }
3737- };
3838-396 return (
407 <>
418 <main className="shortcut-page">
···4411 <p>
4512 If you have an iPhone, iPad, or Macbook, you can download a special Apple Shortcut to your device that will allow you to quickly check a Bluesky account's cred.blue score while you're scrolling inside of the Bluesky app.
4613 </p>
1414+1515+ <p>
1616+ You don't even have to go to an account's profile for the shortcut to work. You can tap the share button on any post, profile, or even use the developer mode "copy author DID" or "copy post URI", letting you quickly check a score even from within a thread or a feed.
1717+ </p>
1818+4719 <div className="image-container">
4820 <img
4921 src="/how-to-use-cred-blue-shortcut.png"
5022 alt="How to use Cred.blue Shortcut"
5123 className="shortcut-image"
5252- onClick={() => openLightbox(0)}
5324 />
5425 </div>
2626+5527 <p>
5628 Once you have the Apple Shortcut installed, go through the setup process to enter your username and then check to make sure that the Share Sheet feature has been enabled.
5729 </p>
3030+5831 <div className="image-container">
5932 <img
6033 src="/enable-share-sheet.png"
6134 alt="Enable Share Sheet"
6235 className="shortcut-image"
6363- onClick={() => openLightbox(1)}
6436 />
6537 </div>
3838+6639 <div className="shortcut-buttons">
6740 <button
6841 className="shortcut-button"
···7245 Download Shortcut
7346 </button>
7447 </div>
4848+7549 </div>
7650 </main>
7777-7878- {isOpen && (
7979- <div className="lightbox-overlay" onClick={handleClickOutside}>
8080- <div className="lightbox-content" ref={galleryRef}>
8181- <ImageGallery
8282- items={images}
8383- startIndex={currentIndex}
8484- onClose={closeLightbox}
8585- showThumbnails={false}
8686- showPlayButton={false}
8787- showFullscreenButton={false}
8888- additionalClass="custom-image-gallery"
8989- />
9090- <button className="close-button" onClick={closeLightbox}>
9191- ×
9292- </button>
9393- </div>
9494- </div>
9595- )}
9651 </>
9752 );
9853};