cards: click opens service directly in new tab, remove modal
This commit is contained in:
parent
e81e410e04
commit
4465f3c5c1
1 changed files with 3 additions and 4 deletions
|
|
@ -179,7 +179,7 @@ function Section({ sec, onCardClick }) {
|
|||
{open && (
|
||||
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: 10 }}>
|
||||
{sec.services.map(svc => (
|
||||
<ServiceCard key={svc.id} svc={svc} onClick={() => onCardClick(svc)} />
|
||||
<ServiceCard key={svc.id} svc={svc} onClick={() => window.open(svc.url, "_blank")} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -202,7 +202,7 @@ function QuickLink({ lk }) {
|
|||
function App() {
|
||||
const [dark, setDark] = useState(() => window.matchMedia("(prefers-color-scheme: dark)").matches);
|
||||
const [qlOpen, setQlOpen] = useState(true);
|
||||
const [modal, setModal] = useState(null);
|
||||
|
||||
const now = useTime();
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -266,7 +266,7 @@ function App() {
|
|||
</div>
|
||||
|
||||
{/* Sections */}
|
||||
{SECTIONS.map(sec => <Section key={sec.id} sec={sec} onCardClick={setModal} />)}
|
||||
{SECTIONS.map(sec => <Section key={sec.id} sec={sec} onCardClick={(svc) => window.open(svc.url, "_blank")} />)}
|
||||
|
||||
{/* Quick Links */}
|
||||
<div style={{ marginTop: 8 }}>
|
||||
|
|
@ -283,7 +283,6 @@ function App() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<ServiceModal svc={modal} onClose={() => setModal(null)} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue