File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ export const ListItem = ({ product }: { product: Product }) => {
5757 } ;
5858
5959 const getPricingDisplay = ( ) => {
60+ if ( product . open_source && ! product . pricing . pricing_available ) {
61+ return "Free/Open Source" ;
62+ }
6063 if ( ! product . pricing . pricing_available ) {
6164 return "Pricing on request" ;
6265 }
Original file line number Diff line number Diff line change @@ -12,8 +12,9 @@ export const PricingFilter = () => {
1212 } , [ filters ] ) ;
1313
1414 const allCount = products . length ;
15- const openSourceCount = products . filter ( product => product . pricing . pricing_available === true ) . length ;
16- const proprietaryCount = products . filter ( product => product . pricing . pricing_available === false ) . length ;
15+ const publicPricingCount = products . filter ( product => product . pricing . pricing_available === true ) . length ;
16+ const pricingOnRequestCount = products . filter ( product => product . pricing . pricing_available === false && ! product . open_source ) . length ;
17+ const freeOpenSourceCount = products . filter ( product => product . open_source && ! product . pricing . pricing_available ) . length ;
1718
1819 useEffect ( ( ) => {
1920 const searchParams = new URLSearchParams ( window . location . search ) ;
@@ -72,7 +73,7 @@ export const PricingFilter = () => {
7273 onChange = { ( ) => handlePricingTypeChange ( "true" ) }
7374 className = "form-radio h-4 w-4 text-blue-600"
7475 />
75- < span className = "text-gray-700" > Public { openSourceCount } </ span >
76+ < span className = "text-gray-700" > Public { publicPricingCount } </ span >
7677 </ label >
7778 < label className = "flex items-center space-x-2 cursor-pointer hover:bg-neutral-50 p-2" >
7879 < input
@@ -83,7 +84,7 @@ export const PricingFilter = () => {
8384 onChange = { ( ) => handlePricingTypeChange ( "false" ) }
8485 className = "form-radio h-4 w-4 text-blue-600"
8586 />
86- < span className = "text-gray-700" > On request { proprietaryCount } </ span >
87+ < span className = "text-gray-700" > On request { pricingOnRequestCount } </ span >
8788 </ label >
8889 </ div >
8990 </ div >
You can’t perform that action at this time.
0 commit comments