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 && (
|
{open && (
|
||||||
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: 10 }}>
|
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: 10 }}>
|
||||||
{sec.services.map(svc => (
|
{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>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
@ -202,7 +202,7 @@ function QuickLink({ lk }) {
|
||||||
function App() {
|
function App() {
|
||||||
const [dark, setDark] = useState(() => window.matchMedia("(prefers-color-scheme: dark)").matches);
|
const [dark, setDark] = useState(() => window.matchMedia("(prefers-color-scheme: dark)").matches);
|
||||||
const [qlOpen, setQlOpen] = useState(true);
|
const [qlOpen, setQlOpen] = useState(true);
|
||||||
const [modal, setModal] = useState(null);
|
|
||||||
const now = useTime();
|
const now = useTime();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -266,7 +266,7 @@ function App() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sections */}
|
{/* 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 */}
|
{/* Quick Links */}
|
||||||
<div style={{ marginTop: 8 }}>
|
<div style={{ marginTop: 8 }}>
|
||||||
|
|
@ -283,7 +283,6 @@ function App() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ServiceModal svc={modal} onClose={() => setModal(null)} />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue