fixing platform routing. not done. updated logo on builder
This commit is contained in:
@@ -27,7 +27,10 @@ const API_BASE_URL =
|
||||
export default function PartDetailPage() {
|
||||
const params = useParams();
|
||||
const categoryId = params.categoryId as CategoryId;
|
||||
const partId = params.partId as string; // this is the UUID we passed in the link
|
||||
|
||||
// Support URLs like /builder/lower/25969-m5-complete-lower-receiver
|
||||
const rawPartParam = params.partId as string;
|
||||
const partId = rawPartParam.split("-")[0]; // "25969-m5-..." -> "25969"
|
||||
|
||||
const [product, setProduct] = useState<GunbuilderProductFromApi | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
Reference in New Issue
Block a user