Fix syntax error in API component