forked from emre/www_projectmycelium_com
refactor: add type assertion for node selection
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import { Eyebrow, SectionHeader, P, CT, CP } from "@/components/Texts";
|
import { Eyebrow, SectionHeader, P } from "@/components/Texts";
|
||||||
import {
|
import {
|
||||||
QuestionMarkCircleIcon,
|
QuestionMarkCircleIcon,
|
||||||
ShieldCheckIcon,
|
ShieldCheckIcon,
|
||||||
@@ -150,7 +150,7 @@ export function NodeProducts() {
|
|||||||
? "border-cyan-500 bg-white/5"
|
? "border-cyan-500 bg-white/5"
|
||||||
: "border-gray-700 hover:border-gray-500"
|
: "border-gray-700 hover:border-gray-500"
|
||||||
}`}
|
}`}
|
||||||
onClick={() => setSelectedNode(nodes[opt.id])}
|
onClick={() => setSelectedNode(nodes[opt.id as keyof typeof nodes])}
|
||||||
>
|
>
|
||||||
<span className="text-white font-medium">{opt.name}</span>
|
<span className="text-white font-medium">{opt.name}</span>
|
||||||
<span className="mt-1 text-sm text-gray-400">{opt.description}</span>
|
<span className="mt-1 text-sm text-gray-400">{opt.description}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user